Skip to content

Commit

Permalink
bind model
Browse files Browse the repository at this point in the history
  • Loading branch information
freekmurze committed Oct 3, 2023
1 parent 11f387e commit 3d37553
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/Providers/RouteServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ protected function mapFrontRoutes()

public function registerRouteModelBindings()
{

Route::bind('post', function($slugId) {
return Post::findByIdSlug($slugId);
});
}

protected function mapPackageRoutes(): self
Expand Down

0 comments on commit 3d37553

Please sign in to comment.