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
Tag: laravel-request
How to show only one error message from Laravel request rules
I am using Laravel request to validate in my controller the requested data and here is my request file data I am facing two challanges first I am not able to return custom message using static function I am not able to send single message as we send in controller validation using errors()->first(). By defalut it is returning like that
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
How to retrieve a url parameter from request in Laravel 5?
I want to perform certain operations with a model in a middleware. Here is an example of what I want to achieve: My question is, how can I retrieve the desired parameter from the $request? Answer