for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Models;
use Backpack\CRUD\app\Models\Traits\CrudTrait;
use Illuminate\Database\Eloquent\Model;
/**
* @mixin IdeHelperFee
*/
class Fee extends Model
{
use CrudTrait;
Backpack\CRUD\app\Models\Traits\CrudTrait
App\Models\Fee
$fakeColumns
$identifiableAttribute
$Type
public $timestamps = false;
protected $guarded = ['id'];
protected $appends = ['price_with_currency', 'type'];
/*
|--------------------------------------------------------------------------
| FUNCTIONS
| RELATIONS
| SCOPES
| ACCESORS
public function getPriceAttribute($value)
return $value / 100;
}
public function getPriceWithCurrencyAttribute()
if (config('app.currency_position') === 'before') {
return config('app.currency_symbol').' '.$this->price;
return $this->price.' '.config('app.currency_symbol');
public function getTypeAttribute()
return 'fee';
| MUTATORS
public function setPriceAttribute($value)
$this->attributes['price'] = $value * 100;