PHP code example of smashed-egg / laravel-model-repository
1. Go to this page and download the library: Download smashed-egg/laravel-model-repository library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
smashed-egg / laravel-model-repository example snippets
return [
/**
* The base Repository Class to use for all Repositories generated via cli
*/
'base_repository' => \SmashedEgg\LaravelModelRepository\Repository\Repository::class,
/**
* Map of Models to Repository classes
*
* Useful when using the RepositoryManager class
*/
'model_repository_map' => [
//\App\Models\User::class => \App\Repositories\UserRepository::class,
],
];
php artisan vendor:publish --provider="SmashedEgg\LaravelModelRepository\ServiceProvider"
php artisan smashed-egg:make:repository UserRepository