PHP code example of jason-guru / laravel-make-repository
1. Go to this page and download the library: Download jason-guru/laravel-make-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/ */
jason-guru / laravel-make-repository example snippets
public function __construct(private UserRepositoryInterface $users) {}
namespace App\Repositories;
use App\Models\User;
use App\Repositories\Contracts\UserRepositoryInterface;
use JasonGuru\LaravelMakeRepository\Repository\BaseRepository;
class UserRepository extends BaseRepository implements UserRepositoryInterface
{
public function model(): string
{
return User::class;
}
}