Skip to content

Commit

Permalink
fix admin menu
Browse files Browse the repository at this point in the history
  • Loading branch information
xxl4 committed Sep 6, 2024
1 parent db4cefc commit 2dfff3c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Http/Controllers/Api/V2/Admin/User/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace NexaMerchant\Apis\Http\Controllers\Api\V2\Admin\User;

use App\Models\Admin;
use App\Models\Permission;
use App\Models\Role;
use NexaMerchant\Apis\Models\Admin;
use NexaMerchant\Apis\Models\Permission;
use NexaMerchant\Apis\Models\Role;
use Illuminate\Support\Facades\Validator;
use Lauthz\Facades\Enforcer;
use Illuminate\Http\Request;
Expand All @@ -15,7 +15,7 @@ class AdminController extends Controller
{
public function menu(Request $request)
{
$admin = $request->user('admin');
$admin = $request->user();
$roles = Enforcer::getRolesForUser($admin->id);
$permissions = [];
foreach ($roles as $role)
Expand Down

0 comments on commit 2dfff3c

Please sign in to comment.