Laravel Resource Controllers: Most Common Mistake People Make

preview_player
Показать описание
I've seen this mistake made so many times on forums, that I finally decided to shoot a separate video on it.

- - - - -
Рекомендации по теме
Комментарии
Автор

Povilas, a recent Laracon talk advanced the idea that every request/response cycle should be made to fit into the standard REST controller even if it didn't seem appropriate. Obviously this requires the developer to be creative and think abstractly about what their inputs and outputs are really doing. But I think it's a bad approach to push the idea too far. Some request/response cycles demand different approaches than create/show/update, etc.

Can you give examples of where you've departed from the typical REST controller design because it just didn't make sense to handle the request/response that way? Might be a good idea for a video.

rosselliot
Автор

Great tip, I am watching all your videos while I am learning with your roadmap. Thanks a lot! 💯

cristhianjhlcom
Автор

I had a feeling when you mentioned a common mistake that this was what you were going to bring up and knew the fix. I've been there done that and figured out the solution as well on my own. I was fortunate that I figured it out cause it's not obvious

JouvaMoufette
Автор

thanks sir i watched this video too late ...earlier i asked same question 2 years ago in laravel forums hardly none of them reply but after that i try by myself and it was working ..thats great you made this video it will help a lot to the people who are beginners . may be sir you can rename this video as how to use other methods with resource controller..because mostly people search like that.

sightskill
Автор

New Theme in PHPStorm... Thank god you arent using the default theme anymore. Thank you for the video.

JohnnyBigodes
Автор

The same solution works for subdomain too 😉

*before the root route... forgot to add that

zaimcodes
Автор

I think you had already explained this earlier in a post. Anyways good to have a clear video on it.

devendergupta_official
Автор

As always your content is awesome! I come come from nestjs but i love Laravel, you should really talk about how to work laravel in a modularize way, that’d be cool.

javieru
Автор

This also apply for api resource routes 😊

nikkolumahang
Автор

Please can you make a example of upload file using job queue

mustafaelsherbeny
Автор

If I am doing an action like generating a PDF I usually create a dedicated controller and use the create method because I was taught that any action that you want to perform will match CRUD, what do people think is better, creating a dedicated controller or just creating a new method in the controller?

sodomousprime
Автор

Hello, wanna say that you are doing greate videos and always Im wondered how cool the Laravel framework:)
I have a small question, Is it possible to join to your developer team if it exists at all?

gtehnex
Автор

I have changed the route get to the top,

But my route->resource doesnt work :'(

adityaerlanggawibowo
Автор

I have not encountered thi issue with resourceApi.. Because show method is not available.

Thanks for the tip though..

renwar
Автор

sir what if I have a wild card route ?
Route::get('projects/{name}/other', something like this...
SO in this case where we have to put this on top or bottom...?

neerajsinghtangariya
Автор

it is simple, but any time ago, to get on one's nerves)

ivantrubchaninov
Автор

So that's why some time my route don't work

joniartha