PHP code example of maxkalahur / laravel-model-settings
1. Go to this page and download the library: Download maxkalahur/laravel-model-settings 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/ */
maxkalahur / laravel-model-settings example snippets
composer isan vendor:publish --provider="MaxKalahur\LaravelModelSettings\CustomSettingServiceProvider" --tag="migrations"
php artisan migrate
$org = DummyOrg::with('customSettings')->first();
foreach (range(1, 10) as $i) {
$org->getCustomSetting('ADDRESS'); // no calls to DB
}