complete story 4.5 with qa tests and applied pagintation fix

This commit is contained in:
Naser Mansour
2025-12-27 01:09:03 +02:00
parent fa9d05de10
commit 68a5551006
11 changed files with 629 additions and 5 deletions
@@ -0,0 +1,19 @@
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use Symfony\Component\HttpFoundation\Response;
class EnsureUserIsClient
{
public function handle(Request $request, Closure $next): Response
{
if (! $request->user()?->isClient()) {
abort(403, __('messages.unauthorized'));
}
return $next($request);
}
}