PHP code example of whilesmart / eloquent-assets
1. Go to this page and download the library: Download whilesmart/eloquent-assets 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/ */
whilesmart / eloquent-assets example snippets
use Whilesmart\Assets\Traits\HasAssets;
class Workspace extends Model
{
use HasAssets;
}
$workspace->assets()->create([
'name' => 'acme.com',
'category' => 'domain',
'value_cents' => 1500,
'currency' => 'USD',
'expires_at' => now()->addYear(),
'renew_interval_months' => 12,
'details' => ['registrar' => 'Namecheap', 'auto_renew' => true],
]);