Cambios generales, a ver si volvemos al desarrollo

This commit is contained in:
2021-06-09 16:24:18 -04:00
parent 1632a2e51f
commit dbb80a9d4e
17 changed files with 314 additions and 520 deletions

View File

@@ -5,36 +5,14 @@ namespace App\Http\Middleware;
use Closure;
use Illuminate\Contracts\Auth\Factory as Auth;
class Authenticate
{
/**
* The authentication guard factory instance.
*
* @var \Illuminate\Contracts\Auth\Factory
*/
class Authenticate {
protected $auth;
/**
* Create a new middleware instance.
*
* @param \Illuminate\Contracts\Auth\Factory $auth
* @return void
*/
public function __construct(Auth $auth)
{
public function __construct(Auth $auth) {
$this->auth = $auth;
}
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @param string|null $guard
* @return mixed
*/
public function handle($request, Closure $next, $guard = null)
{
public function handle($request, Closure $next, $guard = null) {
if ($this->auth->guard($guard)->guest()) {
return response('Unauthorized.', 401);
}