1
0
Fork 0
mirror of https://github.com/archtechx/laravel-tips.git synced 2025-12-12 05:14:04 +00:00
laravel-tips/content/tips/you-can-chain-can-to-route-definitions-to-specify-policy-rules.md
2021-11-12 18:43:31 +01:00

491 B

title tweet_id thread_slug author_username images created_at slug
You can chain ->can() to Route definitions to specify policy rules 1459206740340187141 weekly-thread-2021-45 sky_0xs
https://pbs.twimg.com/media/FDx9zXTXIAkeX_-.jpg
2021-11-12T17:09:32+00:00 you-can-chain-can-to-route-definitions-to-specify-policy-rules

#Laravel Tip: If you are running Laravel v8.70, you can chain can() method directly instead of middleware('can:..')

Here is and example: