Skip to content

Commit

Permalink
move morph map to boot method.
Browse files Browse the repository at this point in the history
  • Loading branch information
holyfabi committed Jun 7, 2024
1 parent 3be676d commit d2667b7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ public function register(): void
*/
public function boot(): void
{
Relation::enforceMorphMap([
'user' => User::class,
]);

$this->configureRateLimiting();

Route::bind('media', function (string $identifier): Media {
Expand All @@ -55,9 +59,5 @@ protected function configureRateLimiting(): void
RateLimiter::for('api', function (Request $request) {
return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip());
});

Relation::enforceMorphMap([
'user' => User::class,
]);
}
}

0 comments on commit d2667b7

Please sign in to comment.