Courses / Laravel PHP for Beginners: Build a Blog
Lesson 4 of 9

Database Migrations & Eloquent Basics

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

Migrations version‑control your schema; run php artisan migrate to apply them. New learners often edit the database directly, then forget to create a migration, causing drift. Define fillable fields in models to guard against mass‑assignment bugs.

Eloquent relationships (one‑to‑many, many‑to‑many) are the backbone of real apps. Test relationships with tinker (php artisan tinker) to ensure queries return expected results before writing controller logic.

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