really helpful, I don't know about scope binding. thank you for this video.
@ramina21212 жыл бұрын
Every video I learn new things ! Thank you great work
@tannercampbell2 жыл бұрын
Nice, didn't know about scope bindings! Typically I would create a Policy to check this, and call `$this->authorize(...)`
@DavidSilva-cp8hg Жыл бұрын
Amazing!!! I was looking for this group scope bind 🎉 thanks so much
@youssofokiel12692 жыл бұрын
Thanks for your great videos 🔥💯
@HaiNguyen-cf1ji2 жыл бұрын
Cool, I was looking for some thing like this for a while now
@bulent24352 жыл бұрын
Very good topic. Thanks.
@rahmanjafarinejad60692 жыл бұрын
Useful tip! Thanks for sharing 👍
@GergelyCsermely2 жыл бұрын
Thanks. Excellent idea!!!
@DougLopes2 жыл бұрын
amazing as always
@itsaminj98912 жыл бұрын
very useful and simple :) thanks a lot!
@pvaitonis2 жыл бұрын
Good tip. Thanks
@prashantpandey78152 жыл бұрын
Very useful.
@taslimsuman2 жыл бұрын
I always do this check but instead id I use slug. Its more readable
@julienSibille2 жыл бұрын
Usefull ! Thank you !
@eloquent22002 жыл бұрын
This is very useful tip, I tried to implement in my project, but it's not working for show method.
@hansherrera53212 жыл бұрын
Still not sure why would you want to have project id as an url parameter if you can still get the relationship directly from the task. Didn't know about scopedBindings tho, thanks
@VolkanKAVAS2 жыл бұрын
perfect !
@coipo1232 жыл бұрын
What's your favorite / ideal way to organize routes ? when projects start to grow, it's a bit weird and it doesn't look good when the routes file starts to grow
@LaravelDaily2 жыл бұрын
I'm a big fan of route groups and route resources. If it grows too big, then maybe separate routes/xxxxxx.php files but personally not a big fan.
@faalarcon100 Жыл бұрын
Please give me the link to the course to learn more about this topic
@andywong22442 жыл бұрын
Povilas, in this example whats the advantage of using nested resource controller compared to just using the single resource controller?
@LaravelDaily2 жыл бұрын
Just more structured way, totally personal preference
@mahmoud-bakheet2 жыл бұрын
How cool of that
@lucasj.pereira49122 жыл бұрын
Hi Povilas. In this new course, will it also cover roles and permissions for each user in each tenancy?
@LaravelDaily2 жыл бұрын
For that, I have a separate course: laraveldaily.teachable.com/p/practical-roles-and-permissions-in-laravel - there's a topic about teams at the end
@OnlinePseudonym2 жыл бұрын
Really interesting to see this - did not know it at all. I wonder if there's merit in these nested routes when the task belongs to a single project - if you have the task, then you automatically have easy access to the project. M2m relationships are obviously different. Do you have any thoughts on that?
@LaravelDaily2 жыл бұрын
Hard to comment, the question feels theoretical "what if", it's better to look at the exact code example and then have thoughts on that.
@OnlinePseudonym2 жыл бұрын
@@LaravelDaily Sure. Since the Task belongs to the object graph of the Project, access to the project is automatically bounded to the project. So I think my point it is (and it's a question I pose to myself as well - not taking anything away from the great video - please keep making your excellent content) - is it simpler / better to (a) use /project/{project}/tasks/{task} and have to add the scope binding declaration, or (b), just have the URL be /tasks/{task}, not have to scope the binding, and if you need to reference the project, simply do it via $task->project.
@soniablanche56722 жыл бұрын
is there a way for each project to have their own tasks with autoincrementing id starting from 0? (task primary key would be an a non-unique autoincrementing value and the project id)
@LaravelDaily2 жыл бұрын
There is a way but it adds huge complexity with custom code, overriding the defaults of the framework, do you REALLY want it?
@soniablanche56722 жыл бұрын
@@LaravelDaily No it's for educational purpose. I've always wondered how you could do it.
@dantondelima99342 жыл бұрын
Is it possible to use with slugs for the projects and tasks this way?
@LaravelDaily2 жыл бұрын
Yes, follow the link to the docs and read details there