Laravel 5: DB Seed class not found

I solved this by adding the class to the seeder file, with the instruction use:

<?php
use Illuminate\Database\Seeder;
use Illuminate\Database\Eloquent\Model;
use App\YourClassName;

Step one - generate seed:

php artisan make:seed MemberInvitationSeeder

Step two - In DatabaseSeeder.php add line:

$this->call(MemberInvitationSeeder::class);

Step three:

composer dump-autoload

Step four:

php artisan db:seed

This should work


If this isn't the clue, check the composer.json file and make sure you have code below in the "autoload" section:

"classmap": [
    "database"
],