fix(Api): removed recursive calls from Api and User
This commit is contained in:
@@ -21,16 +21,5 @@ class AppServiceProvider extends ServiceProvider
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
$this->app->bind(ThemeParkUser::class, function () {
|
||||
$api = app(PhantasialandApi::class);
|
||||
if(ThemeParkUser::query()->count() === 0) {
|
||||
$userData = $api->createUser();
|
||||
return ThemeParkUser::query()->create([
|
||||
'username' => $userData['email'],
|
||||
'password' => $userData['password'],
|
||||
]);
|
||||
}
|
||||
return ThemeParkUser::query()->first();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user