i have project on laravel 5.5 im using middleware and this is the code
<?php
namespace App\Http\Middleware;
use Closure;
class roleMiddleware
{
public function handle($request, Closure $next)
{
// if code to check where the url is
// code here
//else
//code here
//else
//code
//return $next($request);
}
}
so i need code to check where the request come from and if it == something do this if it == something else do that