sineld
Tekrar kontrol eder misiniz? http://ticket.batv.pro/admin/user
UserController.php
içindeki index
methodu
public function index(Request $request)
{
$users = User::whereKeyNot(auth()->id())
->with('permissions','roles'); // <------ eklediğim satır
if(!auth()->user()->hasRole('super-admin')){
$users->role(['admin','user']);
}
/**
* @var User $users
*/
if($request->get('q') != null ){
$users->where(function (Builder $query) use ($request) {
$query->where('first_name','LIKE', '%'.$request->get('q').'%');
$query->orWhere('last_name','LIKE', '%'.$request->get('q').'%');
$query->orWhere('email','LIKE', '%'.$request->get('q').'%');
});
}
return inertia('Admin/User/Index', [
'page_users' => $users->paginate()
]);
}