PHP code example of schickling / laravel-cash

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

    

schickling / laravel-cash example snippets


Route::get('users', array('after' => 'cash', function()
{
	return User::all();
}));

Cash::rule($httpMethod, $triggerRoute, $routesToInvalidate);

Cash::rule('POST', 'users', 'users');

Cash::rule('POST', 'users', array('users', 'premium/users'));

Cash::rule('POST', 'users/.*/photos', 'photos');

Cash::rule('POST', 'photos', 'photos/*');