Courses / Laravel Blog API: Intermediate Hands‑On Course
Lesson 4 of 9

Database Migrations and Seeding

Video by Net Ninja on YouTube · 9 min. We did not make this video and we do not host it — watching it here still counts as a view for the creator.

Observe how to create migration files for users, posts, and comments, and use the schema builder to set indexes. A frequent error is running php artisan migrate before fixing syntax errors, which leaves the DB in an inconsistent state.

Seeders are great for populating demo data; they also serve as a quick sanity check before writing tests.

Start learning free

Sign in with WhatsApp, your phone number, email or Google. No password. The same account carries your progress, your certificates and anything else you do with Nexgino later.

Sign in to continue

It takes about fifteen seconds.

Previous Next lesson All lessons