1. Go to this page and download the library: Download sagni/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/ */
sagni / repository example snippets
namespace App\Repositories\User;
use App\Repositories\User\UserRepositoryInterface;
class UserRepository implements UserRepositoryInterface{
public function __construct(){
}
}
namespace App\Repositories\User;
use Illuminate\Support\ServiceProvider;
use App\Repositories\User\UserRepository;
use App\Repositories\User\UserRepositoryInterface;
class UserRepositoryServiceProvider extends ServiceProvider{
public function register(){
$this->app->bind(UserRepositoryInterface::class,UserRepository::class);
}
public function boot(){
}
}