This video teaches you the basics of populating your database with seed data or initial data to give your database the feel of a lived-in application.
- [Instructor] Seeding in Laravel … is how we can populate our database … with data we want to pre-fill … as a way to give us data we can work with … before the entire site is built out, … hence seeding. … We'll do that now using a prebuilt seeder … that I've provided for you. … Let's look in the exercise files for this course … and this video. … In Chapter_02>02_03, … there's a seed.php file. … We'll copy this file. … And now we'll make our own new seeder. … To do this we'll run a php artisan command … like we've done now a few times. … Recall we need to have our homestead box booted, … and in the code directory. … We'll run the command php artisan make colon seeder. … Capital Hotel. … Capital Seeder. … After our seeder says it was created, … we'll go back to our text editor. … Open up in our database directory, … and in the seeds directory, … we'll see file HotelSeeder.php. … We'll open that up … and paste in the content that we copied … from our seed.php file in the exercise files. …
- 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.