Support the ongoing development of Laravel.io →
Database Blade Forms
Last updated 2 years ago.
0

just check the credentials from the controller. it should work

0

astroanu said:

just check the credentials from the controller. it should work I do not understand what you mean? I need to securely remove a database item (admin only). Thanks

0

Make a check in the controller, if the current user has the rights to remove an item? Also use blade to check if the user is admin, only then show the button.

0

marxi said:

Make a check in the controller, if the current user has the rights to remove an item? Also use blade to check if the user is admin, only then show the button.

Thanks. If the controller has already made the check then why have Blade check it to?

0

oliversb said:

marxi said:

Make a check in the controller, if the current user has the rights to remove an item? Also use blade to check if the user is admin, only then show the button.

Thanks. If the controller has already made the check then why have Blade check it to?

controller checking and blade checking are too different things! you dont want to show this option but also test/check in the controller so that someone couldnt hack their way and delete maliciously

0

Thanks. I just going to presume it is like an extra layer of security.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

oliversb oliversb Joined 6 Nov 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.