Vishal Tarkar
Vishal Tarkar

Reputation: 826

Commands not working with Laravel 5.4

FatalErrorException in UserStoreCommand.php line 8: Interface 'Illuminate\Contracts\Bus\SelfHandling' not found

Here is Code i am using, where its throwing error.

use Illuminate\Contracts\Bus\SelfHandling; 
use Cartalyst\Sentinel\Laravel\Facades\Sentinel;

class UserStoreCommand implements SelfHandling {

I have found same issue was with laravel 5.3 here is link

Please me know if there is any way to use it with laravel 5.4.

Upvotes: 1

Views: 1823

Answers (2)

kelvin
kelvin

Reputation: 514

Actually, SelfHandling is deprecated in laravel 5.4. It's now default so you do not need use Illuminate\Contracts\Bus\SelfHandling; and make sure to remove this implements SelfHandling. It should work then.

Upvotes: 2

Rahul
Rahul

Reputation: 18557

There are several possibilities to let this happen, solutions can vary

  1. remove this line use Illuminate\Contracts\Bus\SelfHandling;
  2. extends Command implements SelfHandling
  3. use app/Commands;

Either of them should work,

And once please go through release notes of laravel 5.4.

Give it a try, it should work.

Upvotes: 3

Related Questions