how to use middleware in laravel if is send token code example
Example: middleware in laravel
<?php
namespace App\Http\Middleware;
use Closure;
class CheckType
{
public function handle($request, Closure $next)
{
// Perform action
return $next($request);
}
}