PHP code example of pwrdk / laravel-custom-attributes
1. Go to this page and download the library: Download pwrdk/laravel-custom-attributes 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/ */
pwrdk / laravel-custom-attributes example snippets
php
AttributeType::create(['handle' => 'prices', 'display_name' => 'Prices in different currencies']);
php
class CustomAttribute extends CustomAttributeModel
{
public function attributeTypeScheduleEventOverlay()
{
return $this->hasOne(AttributeTypeScheduleEventOverlay::class);
}
}