PHP code example of light-speak / laravel_model_cache
1. Go to this page and download the library: Download light-speak/laravel_model_cache 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/ */
light-speak / laravel_model_cache example snippets
injectablephp
/**
* @param bool $useTransaction Whether to use transactions, if true, you must call the saveCache() method to save
*
* @return self|CacheModel
*/
public function cache(bool $useTransaction = false): self|CacheModel
{
$this->has_cache = true;
return ModelCache::make($this, __CLASS__, $useTransaction);
}