Peter Peter - 1 month ago 19x
PHP Question

Laravel 5.3 db:seed command simply doesn't work

I do everything by-the-book:

  1. Installed fresh Laravel 5.3.9 app (all my non-fresh apps produce the same error)

  2. run
    php artisan make:auth

  3. create migrations for a new table
    `php artisan make:migration create_quotations_table --create=quotations

    Schema::create('quotations', function (Blueprint $table) {


    // my problem persists even with the below two columns commented out


  4. Then I run
    php artisan migrate

  5. Then I define a new seed
    php artisan make:seeder QuotationsTableSeeder

The complete content of the file, after I add a simple insert:


use Illuminate\Database\Seeder;

class QuotationsTableSeeder extends Seeder
* Run the database seeds.
* @return void
public function run()
'text' => str_random(10),


  1. Then I run
    php artisan db:seed


it simply doesn't work. No feedback presented, no errors in log file.
The probem persists in both my local environment (Win7, newest WAMP server)
and my Digital Ocean VPS powered by Ubuntu 16.04.
All the above steps I took in several separate apps - for no result. Also under Laragon 2.0.5 server.

what I have tried

php artisan optimize
as suggested here.

composer dump-autoload
php artisan clear-compiled
also have brought no results

I also tried to seed just following the official docs example - failed.

I added
use DB;
to the seed file - still no result.

to do

help!!! How come they don't work?


Do you call your seeder inside the DatabaseSeeder class? This way:


class DatabaseSeeder extends Seeder
     * Run the database seeds.
     * @return void
    public function run()

or, add the --class option when using the php artisan db:seed command, this way:

php artisan db:seed --class="QuotationTableSeeder"