clrghouz/app/Models/Filearea.php
Deon George 48d329e503
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 32s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 1m46s
Create Docker Image / Final Docker Image Manifest (push) Successful in 9s
List files in a file area
2024-10-23 22:09:04 +11:00

39 lines
632 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);
}
public function files()
{
return $this->hasMany(File::class);
}
}