Laravel From Scratch [Part 3] - Basic Routing & Controllers

preview_player
Показать описание
In this video we will create some routes and a controller for our pages. Ill show you how to load a view from a controller function

CODE: Complete Code For This Series

10 PROJECT LARAVEL COURSE: Please use affiliate link below
50% OFF: Use special code "traversy"

SUPPORT: We spend massive amounts of time creating these free videos, please donate to show your support:

FOLLOW TRAVERSY MEDIA:
Рекомендации по теме
Комментарии
Автор

8:34 If you are using Laravel 8 it is a bit different invoking the index method. First you have to include the class with `use Second, you have to register the route like this `Route::get('/', [PagesController::class, 'index'] );`

reedyseth
Автор

I can't thank you enough for making this series. I currently use no frameworks and classes for my projects but due to security risks and meeting the global standards for web development, I have decided to attempt to move to using frameworks. I am not used to using classes at all as I had found it hard to grasp the concept some years back so it's a bit intimidating

Billinous
Автор

If you get the error "Target class [ControllerName] does not exist", this is how to fix it:
1. Add this to web.php file : use

yasdia
Автор

Brad... there are no words to express gratitude to your awesome knowledge and the fact that you share it so well! May life be giving you back tenfold!

yajuteknologic
Автор

I finally got a complete series on Laravel - at least at the initial level. This is the best laravel series. Love from India :)

MrAKGarg
Автор

Thank you for this tutorial to start from scratch.

SuLinTan
Автор

This serie is outstanding! I'd like to congratulate you for your amazing work! Thank you!

leandesYT
Автор

Brad you're helping the juniors out a lot

geertpeerd
Автор

Dude, I'm loving these tutorials. Thank you kind sir! Keep up the good work bro.

jpsilver
Автор

You are really amazing . thank you very much. Respects from Armenia !!!

edmonvevo
Автор

You the best Brad, I'm learning a lot with these videos, big ups to you. # SouthAfrica

esethun
Автор

Mann!! you are a KING.. no words to thank you

AvrahamTOLEDANO
Автор

Thank you very much, it is realy helpful!
For the ones getting Error 404 on Windows to get to some route, for instance the page /hello, open the file xampp/apache/conf/httpd.conf, look for
<Directory />
AllowOverride None
Require all denied
</Directory>
And change the 'AllowOverride None' to : AllowOverride all
I got this error first, but now works fine with me!

hodaelmerabet
Автор

best video for learning have seen so far

M.x_mutua
Автор

3rd Part is done! Thank you Brad!!! :)

backupmagnate
Автор

Best Series and Crash Course are by the Brad Traversy ....I m A big Fan of you...You are the best

jayeshprajapati
Автор

Great tutorial, very clear. First time introducing to an MVC framework fully, was going to try CI but Laravel appears to have so much more.

peterfitzgibbon
Автор

Concerning the routing using the class name and respective method. I had a difficulty with that cause I run the latest 8.+. So i figured out the method you used didn't work unless i import the class through the 'use' command. Thanks a lot.

football_streaming
Автор

i learned a lot in this tuts. wish you provide us more tuts for us to become more productive in programming

albertgarcia
Автор

SO WHY DO WE NEED CONTROLLERS
THANK YOU FOR THE COURSE BY THE WAY IT SEEMS AWESOME

amribrahim