Browse Source

add new response appConfig

pull/1/head
farhantock 8 months ago
parent
commit
e2e0676092
  1. 5
      app/Http/Controllers/AuthController.php

5
app/Http/Controllers/AuthController.php

@ -8,6 +8,7 @@ use Illuminate\Support\Facades\Hash;
use App\Models\User;
use App\Models\Role;
use App\Models\Company;
use Illuminate\Http\JsonResponse;
use Illuminate\Support\Facades\Password;
use Illuminate\Validation\ValidationException;
@ -58,6 +59,10 @@ class AuthController extends Controller
$dataRole = Role::find($user->role_id);
$dataHierarchy = $this->getDataHierarchy($user->divisi_id, $user->id);
$configApp = Company::where('id', $user->company_id)->first();
if ($configApp)
$user->configApp = $configApp;
if ($dataRole)
$user->role = $dataRole;

Loading…
Cancel
Save