Skip to content
Advertisement

Tag: laravel-request

Laravel spatie roles unique validation for multiple id during update

I created a role “Administrator” but each has one unique guard. I successfully generated them by creating custom function that replicates the web guard to sanctum. Or vice-versa depending where the role is created (e.g react frontend->sanctum guard), or laravel -> web guard). Roles table My current request validation rule is this: I also tried this, but this won’t work

Laravel URL Filtering with GET

I am building a simple Laravel routing to display an array when someone goes to http://127.0.0.1:8000/planets But I need to make a filter to check the array on what request has been send on the URL. For example: http://127.0.0.1:8000/planets?planet=mars I need to make sure that if a GET parameter is present, you filter the array based on whether the planet

Advertisement