File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -96,8 +96,8 @@ public function createUser()
9696 public function copyMasterTemplate ()
9797 {
9898 Crud::create ([
99- 'name ' => 'Users ' ,
100- 'title ' => 'Users ' ,
99+ 'name ' => 'User ' ,
100+ 'title ' => 'User ' ,
101101 'is_crud ' => 0
102102 ]);
103103 $ this ->callSilent ('vendor:publish ' , [
Original file line number Diff line number Diff line change @@ -31,7 +31,12 @@ public function create()
3131 // Get columns for relationship
3232 $ models = [];
3333 foreach (Crud::all () as $ crud ) {
34- $ tableName = strtolower ($ crud ->name );
34+ // We are having a default User model
35+ if ($ crud ->title == 'User ' && $ crud ->is_crud == 0 ) {
36+ $ tableName = 'users ' ;
37+ } else {
38+ $ tableName = strtolower ($ crud ->name );
39+ }
3540 $ models [$ crud ->id ] = Schema::getColumnListing ($ tableName );
3641 }
3742
You can’t perform that action at this time.
0 commit comments