Top "Laravel-middleware" questions

HTTPl Middleware is a mechanism for filtering HTTP requests that are passing through your application.

Laravel - Passing variables from Middleware to controller/route

How can I pass variables from a middleware to a controller or a route that executes such middleware? I saw …

laravel laravel-middleware
Restrict route access to non-admin users

Goal I'm trying to create Admin route restriction for my log-in users. I've tried a check to see if my …

php laravel laravel-5 laravel-routing laravel-middleware
Apply Auth Middleware to All Laravel Routes

What is the correct way to authenticate all routes except login and register when I apply auth middleware in all …

laravel laravel-5 laravel-routing laravel-middleware
How to prevent Laravel Routes from being accessed directly (i.e. non-ajax requests)

In my project, I am using Laravel purely as a backend api and all frontend is handled by Angular javascript. …

laravel laravel-routing laravel-5.1 laravel-middleware laravel-filters
Using Auth::user in middleware

I'm trying to check if the URL entered is the same as the authenticated users slug in the database. So …

laravel laravel-middleware
Laravel CORS with Fruitcake

I make react project with laravel Back-end ... I have a CORS problem, I do everything like on link below, with …

reactjs laravel react-redux cors laravel-middleware
Laravel 5 - how to use basic auth with username in place of email?

Hello guys ! So in Laravel 4 we could do Route::filter('auth.basic', function() { return Auth::basic('username'); }); But now it's …

laravel laravel-5 basic-authentication laravel-middleware
Laravel - How to pass variables to middleware through route group?

This is my route group, Route::group(['middleware' => 'checkUserLevel'], function () { // my routes }); And this is my middleware checkUserLevel, public …

php laravel-5 laravel-routing laravel-5.4 laravel-middleware
What does "bindings" middleware do in Laravel 5.6?

Just as per the title. Default api middleware in Laravel 5.6 is listed in Kernel.php as: protected $middlewareGroups = [ 'api' => [ …

laravel laravel-5 middleware laravel-middleware
Modify input in laravel middleware

Some service makes HTTP request to my site and passes some input. This input has a little bit wrong structure …

php laravel laravel-5 laravel-5.1 laravel-middleware