PHP code example of risetechapps / repository-for-laravel

1. Go to this page and download the library: Download risetechapps/repository-for-laravel 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/ */

    

risetechapps / repository-for-laravel example snippets


  class ClientEloquentRepository extends BaseRepository implements ClientRepository
  {
    public function entity(): string
    {
        return Client::class;
    }

    public function entityOn(): Client
    {
        return new Client();
    }
  }


  interface ClientRepository extends RepositoryInterface
  {
    public function entityOn();
  }
  
bash
  php artisan vendor:publish --provider="RiseTechApps\Repository\RepositoryServiceProvider"