fix : 권한관리 기능 추가 (각 기능 확인 필요)
- 메뉴관리 - 역할관리 - 부서관리 - 메뉴, 부서, 역할, 유저 - 권한 연동
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use App\Models\Commons\Menu;
|
||||
use App\Observers\MenuObserver;
|
||||
|
||||
class AppServiceProvider extends ServiceProvider
|
||||
{
|
||||
@@ -27,7 +29,7 @@ public function register(): void
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
//
|
||||
// DB::enableQueryLog();
|
||||
Builder::macro('debug', function($debug = null) {
|
||||
if (is_null($debug) && app()->environment('local')) {
|
||||
$debug = true;
|
||||
@@ -37,5 +39,8 @@ public function boot(): void
|
||||
}
|
||||
return $this;
|
||||
});
|
||||
|
||||
// 메뉴 생성/수정/삭제 ↔ 권한 자동 동기화
|
||||
Menu::observe(MenuObserver::class);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user