34 lines
562 B
PHP
34 lines
562 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
use App\Traits\{AreaSecurity,ScopeActive};
|
|
|
|
class Filearea extends Model
|
|
{
|
|
use SoftDeletes,ScopeActive,AreaSecurity;
|
|
|
|
protected $casts = [
|
|
'first_file' => 'datetime:Y-m-d H:i:s',
|
|
'last_file' => 'datetime:Y-m-d H:i:s',
|
|
];
|
|
|
|
protected $fillable = [
|
|
'name',
|
|
];
|
|
|
|
/* RELATIONS */
|
|
|
|
public function addresses()
|
|
{
|
|
return $this->belongsToMany(Address::class);
|
|
}
|
|
|
|
public function domain()
|
|
{
|
|
return $this->belongsTo(Domain::class);
|
|
}
|
|
} |