Hi, I'm new to Laravel and have no previous experiences with it. My only experience with a PHP framework is CakePHP 2, which I have used for 3 years at work. I'm now working on a personal project and wanted to try out Laravel.
I have no idea what is supposed to be used for what. I know how to work with Model-View-Controller system in CakePHP 2 but I have no idea e.g what Middleware is for. Is there some guide to help me understand everything better or does someone else also have experience with CakePHP 2 and give some helpful advice? I've read the documentation but since English is not my first language, everything is not too clear for me immediately.
Also do I really need to route everything manually? In CakePHP2 I just have the view rendering function in controller and everything just works.
yes you have to create your route , then route link to your controller. well i remember codeigniter does not requre create own route.
middleware is like a extra layer before the request hit your application , for example you can create middleware to check if a logined user is admin. it just a extra layer implement before hit your endpoint. you can check many other things and decide give error or not.
@ehangeto4 yes, read the https://laravel.com/docs head to tail, you will be pleasantly surprise how elegantly Laravel solves some of the most common web dev challenges that other frameworks struggle with. Just ask if there is some part that you do not understand. What is your first language?
I came from CodeIgniter and was wondering why do we need to have the extra trouble of routing. But if you think about it, how often do we struggle in CI with HTTP PUT/PATCH/DELETE and trying to think of a good name for our methods, especially when they need to be the SAME URL.
I have done a couple of projects in Cake PHP also, not 2, but 3. I can tell you now I like laravel much better. I did not like the paginator in cake, so I use my own.
But if you can get someone to help you view the videos in the from scratch series that would be a good way to start. Meaning if you do not understand the English someone could watch with you and explain.
I do wish laravel had optional routing for some endpoints, because many times they're just routes for the public that anyone can view at any time. I would prefer routing for only where authentication is required.