1. Go to this page and download the library: Download supplycart/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/ */
supplycart / settings example snippets
declare(strict_types=1);
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Supplycart\Settings\Contracts\HasSettings as HasSettingsContract;
use Supplycart\Settings\Traits\HasSettings;
final class Company extends Model implements HasSettingsContract
{
use HasSettings;
public static function getDefaultSettings(): array
{
return [
'timezone' => 'Asia/Kuala_Lumpur',
'notifications' => [
'email' => true,
],
];
}
}