73 lines
2.0 KiB
PHP
73 lines
2.0 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Backpack\CRUD\app\Models\Traits\CrudTrait;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Backpack\CRUD\app\Models\Traits\SpatieTranslatable\HasTranslations;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
|
|
|
class BrokerDocument extends Model
|
|
{
|
|
use CrudTrait;
|
|
use HasTranslations;
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| GLOBAL VARIABLES
|
|
|--------------------------------------------------------------------------
|
|
*/
|
|
|
|
protected $table = 'broker_documents';
|
|
// protected $primaryKey = 'id';
|
|
// public $timestamps = false;
|
|
// protected $guarded = ['id'];
|
|
protected $fillable = [
|
|
'name',
|
|
'description',
|
|
'max_size',
|
|
'business',
|
|
'company',
|
|
'all_country',
|
|
'order',
|
|
'is_required'
|
|
];
|
|
// protected $hidden = [];
|
|
// protected $dates = [];
|
|
protected $translatable = ['name', 'description'];
|
|
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| FUNCTIONS
|
|
|--------------------------------------------------------------------------
|
|
*/
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| RELATIONS
|
|
|--------------------------------------------------------------------------
|
|
*/
|
|
public function broker_attachments(): BelongsToMany{
|
|
return $this->belongsToMany(BrokerAttachment::class);
|
|
}
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| SCOPES
|
|
|--------------------------------------------------------------------------
|
|
*/
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| ACCESSORS
|
|
|--------------------------------------------------------------------------
|
|
*/
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| MUTATORS
|
|
|--------------------------------------------------------------------------
|
|
*/
|
|
}
|