Files
2026-07-07 17:02:39 +03:30

22 lines
616 B
PHP

<?php
namespace App\Http\Middleware;
use Illuminate\Auth\Middleware\Authenticate as Middleware;
class Authenticate extends Middleware
{
/**
* Get the path the user should be redirected to when they are not authenticated.
*
* @param \Illuminate\Http\Request $request
* @return string|null
*/
protected function redirectTo($request)
{
// اپ API-only است و روت login ندارد؛ بازگرداندن null باعث پاسخ 401 JSON می‌شود
// (به‌جای پرتاب RouteNotFoundException و پر شدن لاگ).
return null;
}
}