In this video, run your very first Laravel migration and learn how to write the code that creates database tables for you to read and write to store information against.
- [Speaker] We've already run one migration. … But now we'll actually build out our own migration. … How do we approach writing our own migration? … First, what is a migration? … We'll create a new migration … and from that we'll kind of see what a migration is. … We'll start off in our homestead box … in the directory where our Laravel project lives. … If you followed the previous videos, … this would be in the code directory … inside of our homestead box. … We'll run the command php artisan make colon migration … create underscore hotel underscore tables … dash dash create equals rooms. … After this command completes, … we'll open up our text editor … and look at the file that it generated. … We'll look in database, migrations … and there we'll see in the third file in our migrations list … we'll see a create hotels dot php file. … Our migration class has two core functions, … an up function that's on line 14 … and a down function that's on line 27. … Up is what happens when your migration runs up. …
- Exploring Laravel
- Setting up simple authentication
- Controllers and routes
- Create and index view
- Show, edit, and destroy views
- Writing scopes in Laravel Eloquent
- Creating one-to-one relationships
Skill Level Beginner
MVC Frameworks for Building PHP Web Applicationswith Drew Falkman2h 57m Intermediate
Ajax with PHP: Add Dynamic Content to Websiteswith Kevin Skoglund3h 37m Intermediate
What you should know1m 52s
2. Starting Your Project
3. The Create and Index Views
4. The Show, Edit, and Destroy Views
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.