-
app/Providers/AppServiceProvider.php
Open in GitHubuse App\Repositories\AuthorRepository; use App\Repositories\CategoryRepository; use App\Repositories\JobRepository; use App\Repositories\PostRepository; use Illuminate\Support\ServiceProvider; class AppServiceProvider extends ServiceProvider { // public function register(): void { // $this->registerRepositories(); } public function registerRepositories(): void { $this->app->singleton(PostRepository::class); $this->app->singleton(AuthorRepository::class); $this->app->singleton(CategoryRepository::class); $this->app->singleton(JobRepository::class); } // }