PHP code example of nocs / laravel-retriever
1. Go to this page and download the library: Download nocs/laravel-retriever 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/ */
nocs / laravel-retriever example snippets
namespace App\Cache;
class Colors
{
public function red(): string
{
return 'red';
}
}
$value = retriever()->get('colors.red');
// or: $value = retriever('colors.red');