PHP code example of hmdev1 / laravel-repository

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

    

hmdev1 / laravel-repository example snippets


Czim\Repository\RepositoryServiceProvider::class,

    $repository->pushCriteria(new SomeCriteria(), 'KeyForCriteria');

    // you can remove Criteria by key
    $repository->removeCriteria('KeyForCriteria');

    // you can push one-time Criteria
    $repository->pushCriteriaOnce(new SomeOtherCriteria());

    // you can override active criteria once by using its key
    $repository->pushCriteriaOnce(new SomeOtherCriteria(), 'KeyForCriteria');

    // you can remove Criteria *only* for the next retrieval, by key
    $repository->removeCriteriaOnce('KeyForCriteria');
bash
php artisan vendor:publish --tag="repository"