Untitled
unknown
php
a year ago
825 B
2
Indexable
<?php namespace App\Http\Middleware; use Closure; use Illuminate\Support\Str; class Demo { /** * Handle an incoming request. * * @param \Illuminate\Http\Request $request * @param \Closure $next * @return mixed */ public function handle($request, Closure $next) { $not_allow_path = [ 'admin-home', 'user-home' ]; $allow_path = [ 'admin-home/visited/os', 'admin-home/visited/browser', 'admin-home/visited/device', 'admin-home/visited-url', 'admin-home/media-upload/all', 'admin-home/media-upload/loadmore' ]; $contains = Str::contains($request->path(), $not_allow_path); return $next($request); } }
Editor is loading...
Leave a Comment