I have this error on my console. I am using Jobs from Laravel 5.4 and I am moving the Feed Model to App \ Models \ Feed . Since two days, I have this error because Laravel does not find the Feed Model . I restarted my jobs using php artisan queue: restart .
[2017-07-13 10:45:33] staging.ERROR: Symfony \ Component \ Debug \ Exception \ FatalThrowableError: Class 'App \ Feed' not found in / home / site _com / http / www / vendor / laravel / framework /src/Illuminate/Queue/SerializesAndRestoresModelIdentifiers.php:45
<?php
namespace App\Jobs;
use App\Models\Feed;
use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
class FetchFeeds implements ShouldQueue {
protected $feed;
public function __construct(Feed $feed)
{
$this->feed = $feed;
}
}
My feed model:
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Jenssegers\Mongodb\Eloquent\HybridRelations;
class Feed extends Model
{
use HybridRelations;
protected $connection = 'mysql';
protected $fillable = [
];
protected $dates = [
'created_at',
'updated_at'
];
...
}