Laravel 5.3 db:seed command simply doesn't work

Laravel 5.3 db:seed command simply doesn't work

  1. Blog
  2. 15 November 2026
  3. 3 min read

Stefan Bogdanescu

Founder & Senior Architect

Why php artisan db:seed Silently Fails in Laravel 5.3

If you are running php artisan db:seed in a fresh Laravel 5.3 application and receive absolutely no output—no success messages, no error logs, and no changes to your database—you are likely encountering the silent failure known as "nothing happened." This specific behavior was a documented quirk in early versions of Laravel 5, particularly around version 5.3.9, where the seeder would execute but fail to return any feedback or throw exceptions if the seed data could not be inserted.

The root cause isn't usually a misconfigured environment or a missing dependency like DB in your file. In the scenario described, the developer has correctly installed the app, run make:auth, created migrations with standard columns (including unsigned integer IDs for creators), and defined a seeder using the insert method on the quotations table. Even after running php artisan optimize, composer dump-autoload, or clearing compiled files, the silence persists.

The issue stems from how Laravel handles the insert command in seeders versus database transactions during that specific version cycle. In some configurations of Laravel 5.3, if the seeder runs inside a transaction context or under certain server conditions (like WAMP on Windows 7 or specific Ubuntu setups), the framework might swallow exceptions related to foreign key constraints or simply fail to output the result of the insert operation without raising an error level that appears in the log.

To resolve this, you need to bypass the silent execution mode by forcing Laravel to treat the seeder as a standard query runner that respects database state. The most reliable workaround involves explicitly enabling the database connection's transaction support or ensuring the seeder is run with verbose output enabled.

You can achieve this by modifying your database.php configuration file located at config/database.php. Look for the 'default' => 'mysql' (or sqlite/postgres) line and ensure you have explicitly defined the connections array if not already present, though in 5.3.x this is often auto-detected. However, a more direct fix often involves checking your .env file or ensuring that DB_CONNECTION matches your actual environment.

If you must stick to the exact steps from the official docs and still see no output, try running the seeder directly with the class name instead of using the generic command:

php artisan db:seed --class=QuotationsTableSeeder

This forces Laravel to load that specific seeder without relying on the DatabaseSeeder master seed file, which sometimes gets skipped if not explicitly configured in config/database.php. Additionally, ensure your config/database.php file has this line uncommented:

'migrate' => true,

While this setting controls migrations, it often interacts with the seeding logic in older Laravel versions to ensure the database state is treated consistently.

Another common pitfall in Laravel 5.3 seeders is the use of str_random without ensuring the underlying string generator is available, though this is rare in standard installs. The real culprit is often that the seeder runs in a transaction that rolls back immediately after completion if the application exits without an explicit commit, leaving the database unchanged and silent.

To guarantee visibility and persistence, wrap your insertion logic in an explicit transaction or ensure you are running on a version where db:seed outputs results by default. If you continue to face issues, consider upgrading to Laravel 5.4 or later, where these silent failures were patched and the feedback loop between seeders and the CLI was significantly improved.

For further reading on managing database states in older Laravel versions, resources like https://laravelcompany.com offer guidance on maintaining backward compatibility while modernizing your stack.

Our network