File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -178,8 +178,8 @@ public function setup(Request $request)
178178 ]);
179179
180180 // Add current user to panichd_admin
181- $ admin = Member ::find (auth ()->user ()->id );
182- $ admin ->panichd_admin = true ;
181+ $ admin_user = User ::find (auth ()->user ()->id );
182+ $ admin_user ->panichd_admin = true ;
183183
184184 if ($ request ->has ('quickstart ' )){
185185 // Insert quickstart seed data
@@ -188,11 +188,14 @@ public function setup(Request $request)
188188 ]);
189189
190190 // Add current user as an agent in the last added category
191- $ admin ->panichd_agent = true ;
192- $ admin ->categories ()->sync ([Category::first ()->id ]);
191+ $ admin_user ->panichd_agent = true ;
192+
193+ // App\User doesn't have categories()
194+ $ admin_member = Member::find (auth ()->user ()->id );
195+ $ admin_member ->categories ()->sync ([Category::first ()->id ]);
193196 }
194197
195- $ admin ->save ();
198+ $ admin_user ->save ();
196199
197200 \Cache::forget ('panichd::installation ' );
198201
You can’t perform that action at this time.
0 commit comments