Learn the Laravel PHP framework from scratch by building a job listings application with Laravel 9 and MySQL.
⭐ Sponsor:
https://linode.com/traversy
💻 Github Repo:
https://github.com/bradtraversy/laragigs
💻 Gists:
Laravel Valet Setup:
https://gist.github.com/bradtraversy/b58f74cd863a465068eaeaae1544d9be
Laravel Xampp Setup:
https://gist.github.com/bradtraversy/7485f928e3e8f08ee6bccbe0a681a821
MySQL Cheat Sheet:
https://gist.github.com/bradtraversy/c831baaad44343cc945e76c2e30927b3
💻 My Courses & More
https://traversymedia.com
👇 PHP OOP MVC Udemy Course:
https://www.udemy.com/course/object-oriented-php-mvc
💖 Show Support
Patreon: https://www.patreon.com/traversymedia
PayPal: https://paypal.me/traversymedia
👇 Follow Me On Social Media:
Twitter: https://twitter.com/traversymedia
Instagram: https://www.instagram.com/traversymedia
Linkedin: https://www.linkedin.com/in/bradtraversy
Timestamps:
0:00 – Intro
1:30 – Linode Sponsor
2:13 – Project Demo
6:21 – Setting Up Laravel
13:50 – Routing & Responses
19:28 – Wildcard Endpoints
20:16 – Route Constraints
21:06 – Die Dump Helpers
22:30 – Request & Query Params
26:26 – API Routes
28:26 – View Basics & Passing Data
32:36 – Blade Templates & Basic Directives
36:42 – Creating a Basic Model
43:46 – Database Setup & Config
46:03 – Create Database & User
48:44 – Creating Database Migrations
52:44 – Running Migrations
54:06 – Database Seeding
58:29 – Create an Eloquent Model
1:02:49 – Creating a Factory
1:07:18 – Creating a Layout & Sections
1:09:54 – Adding the Theme HTML
1:19:02 – Template Partials
1:22:54 – Single Listing Formatting
1:26:00 – Route Model Binding
1:28:18 – Blade Components
1:32:53 – Component Attributes
1:35:20 – Tags Component
1:40:38 – Controllers
1:44:09 – Resource Method Naming
1:46:34 – Using a Layout Component
1:49:08 – Tag Filter
1:57:31 – Search Filter
2:01:29 – Clockwork Package
2:04:05 – Create Listing Form
2:10:39 – Validation & Store Listing
2:23:30 – Mass Assignment Rule
2:27:20 – Flash Messages
2:32:49 – Alpine.js For Message Removal
2:36:33 – Keep Old Data In Form
2:38:46 – Pagination
2:45:20 – File Upload
2:57:24 – Edit Listing
3:09:16 – Delete Listing
3:13:32 – User Registration
3:30:00 – Auth Links
3:32:46 – User Logout
3:37:20 – User Login
3:47:02 – Auth & Guest Middleware
3:51:30 – Relationships
3:59:05 – Tinker Tinkering
4:01:35 – Add Ownership to Listings
4:05:31 – Manage Listings Page
4:14:22 – User Authorization
source
It took me a few weeks to get this done and recorded. Hope you enjoy!
If you are new to PHP, I have a recent 3 hour course on YouTube that you can check out first if needed – https://www.youtube.com/watch?v=BUCiSSyIGGU
I also have an API project with Sanctum Authentication – https://youtu.be/MT-GJQIY3EU
Great tutorial…how can I add functionality for companies to pay for listings and pay via Stripe?
thank!!!!, This video is really helpful for me!!!
I have to thank you. I watched and studied this course early this year and I'm now working part time as assistant of a senior developer while completing my CS degree. We use Laravel a lot.
Just very cool crash course and project. I can only say thank you very much.
why we didn't used any asynchronous functions or laravel guarantees async calls
How to design the Laravel logo
https://www.youtube.com/watch?v=jYgEv6GvV6I
One thing to point out here if not mentioned already… When deleting a listing, the image file itself still remains in the storage/app/public/images folder. I managed to solve this by adding an 'if' statement to the destroy method which checks for the existence of the image file path / not null. If true then the file can be deleted using Storage::delete('public/' . $imageFilePath). Have also added a cool fade-out effect for the flash messages and set the URL slugs to match the listing title (instead of id). Had to modify some of the controller methods but it's all working. Thanks Brad – love the channel!
Thanks for the efforts, Appreciate it
I follwed the steps for file upload and it uploads the the public folder but the path is not in the database
at the 4:08:23 i am getting an error: Undefined method 'listings'.
Please help I've tried everything
Hi I ahve been watching this channel for years now and I am a Senior Developer I must say that it has helped me along me journey, keep it up!!
'"59:13" just after brad deleted the Listing,php and created a new one using artisan make:modal, i am getting an error *SQLSTATE[HY000] [1045] Access denied for user 'dummy'@'localhost' (using password: YES) (Connection: mysql, SQL: select * from `listings`) *
I have also checked .env variables
DB_DATABASE="laragigs"
DB_USERNAME="dummy"
DB_PASSWORD="password"
3:25:00
01:30:00
Thank you Brad.
01:34:40 That's what she said 😀
laravel this days are often changing, thus any guide within 1 month are no longer working. you will get stuck by 1 hour into it. So look for newer trainings. Laravel has too many changes are deem unstable. You are better off with .NET or JAVA or even nodejs or golang
This is such an in depth and informative course. I've been meaning to get round to learning Laravel but got distracted with React and TypeScript. This was a brilliant introduction. Feel like i've learned enough to go away and build some really cool projects that have been on my hit list. Thanks Brad!
i feel like i learned so much. im even going to transform this into a real project. thank you so much