public function register()
{
$this->app->singleton(UserRepositoryContract::class, function () {
$repository = new UserReporitory(
new User()
);
return new $repository;
});
}
class UserRepository implements UserRepositoryContract
{
private $model;
public function __construct($user)
{
$this->model = $user;
}
}