create performance for supervisor

This commit is contained in:
2025-08-10 14:57:53 +03:30
parent e6f84b3b6f
commit 47b4f12dfd
17 changed files with 264 additions and 104 deletions

View File

@@ -0,0 +1,28 @@
<?php
namespace App\Http\Controllers\ProvinceDashboard;
use App\Http\Controllers\Controller;
use app\Http\Traits\ApiResponse;
use App\Models\User;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Hash;
class VerifyAuthenticationController extends Controller
{
use ApiResponse;
public function login(Request $request)
{
if (!Hash::check(config('globalVariables.LOGIN_HASH_VALUE'), $request->token)) {
return $this->errorResponse('Invalid token');
}
$user = User::query()->findOrFail($request->user_id);
Auth::login($user);
return redirect('/');
}
}