app/Http/Middleware/ManualRoutesAuthorization.php
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Redirect;
class ManualRoutesAuthorization
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle(Request $request, Closure $next)
{
if (!$request->user()) {
if ($request->is('admin/h5p/h5p*')) {
return Redirect::to('login');
}
}
return $next($request);
}
}