fixed some user bug

master
A1Gard 2 months ago
parent cad797d8bf
commit a117e04ee4

@ -40,6 +40,9 @@ class Acl
}
}
}
if (auth()->user()->accesses()->count() == 0){
return redirect()->route('admin.logout')->with(['message' => "You don't have any access to login"]);
}
}
}
return $next($request);

@ -36,7 +36,7 @@
<i class="ri-user-3-line"></i>
{{__("Avatar")}}
</h3>
<img src="{{$item->avatar()}}" class="img-fluid mb-3" alt="" data-open-file="#avatar-input">
<img @if(isset($item)) src="{{$item->avatar()}}" @else src="{{asset('assets/default/unknown.svg')}}" @endif class="img-fluid mb-3" alt="" data-open-file="#avatar-input">
<input type="file" name="avatar" id="avatar-input" accept="image/jpeg">
</div>
</div>

@ -38,7 +38,7 @@
</a>
<div class="dropdown-menu dropdown-menu-end" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="{{ route('logout') }}"
<a class="dropdown-item" href="{{ route('admin.logout') }}"
onclick="event.preventDefault();
document.getElementById('logout-form').submit();">
{{ __('Logout') }}

@ -18,6 +18,7 @@ Route::prefix(config('app.panel.prefix'))->name('admin.')->group(
Route::get('/', [\App\Http\Controllers\HomeController::class, 'index'])->name('home');
Route::any('logout', [\App\Http\Controllers\Auth\LoginController::class, 'logout'])->name('logout');
Route::post('ckeditor/upload', [\App\Http\Controllers\Admin\CkeditorController::class, 'upload'])->name('ckeditor.upload');
Route::get('adminlogs', [\App\Http\Controllers\Admin\AdminLogController::class, 'index'])->name('adminlog.index');
Route::get('guestlog', [\App\Http\Controllers\Admin\GuestLogController::class, 'index'])->name('guestlog.index');

Loading…
Cancel
Save