File tree Expand file tree Collapse file tree 3 files changed +15
-5
lines changed Expand file tree Collapse file tree 3 files changed +15
-5
lines changed Original file line number Diff line number Diff line change 2323 //Default home action
2424 // 'homeAction' => '\App\Http\Controllers\MyOwnController@index',
2525 // Default role to access users and CRUD
26- 'defaultRole ' => 1
26+ 'defaultRole ' => 1 ,
2727
28- ];
28+ // If set to true, you'll need to copy the routes
29+ // from vendor/laraveldaily/quickadmin/src/routes.php into your own /routes folder
30+ 'standaloneRoutes ' => false ,
31+
32+ // Used to define relationship with UserLogs
33+ 'userModel ' => \App \User::class
34+
35+ ];
Original file line number Diff line number Diff line change @@ -14,6 +14,6 @@ class UsersLogs extends Model
1414
1515 public function users ()
1616 {
17- return $ this ->hasOne (' App\User ' , 'id ' , 'user_id ' );
17+ return $ this ->hasOne (config ( ' quickadmin.userModel ' ) , 'id ' , 'user_id ' );
1818 }
19- }
19+ }
Original file line number Diff line number Diff line change 77use Illuminate \Support \Facades \View ;
88use Laraveldaily \Quickadmin \Models \Menu ;
99
10+ if (config ('quickadmin.standaloneRoutes ' )) {
11+ return ;
12+ }
13+
1014if (Schema::hasTable ('menus ' )) {
1115 $ menus = Menu::with ('children ' )->where ('menu_type ' , '!= ' , 0 )->orderBy ('position ' )->get ();
1216 View::share ('menus ' , $ menus );
105109 });
106110});
107111
108- // @todo move to default routes.php
109112Route::group ([
110113 'namespace ' => 'App\Http\Controllers ' ,
111114 'middleware ' => ['web ' ]
You can’t perform that action at this time.
0 commit comments