27 lines
633 B
PHP
27 lines
633 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Database\Factories\DepartmentProfileFactory;
|
|
use Illuminate\Database\Eloquent\Attributes\Fillable;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
|
|
#[Fillable(['name'])]
|
|
class DepartmentProfile extends Model
|
|
{
|
|
/** @use HasFactory<DepartmentProfileFactory> */
|
|
use HasFactory;
|
|
|
|
/**
|
|
* Get the departments for the profile.
|
|
*
|
|
* @return HasMany<Department, $this>
|
|
*/
|
|
public function departments(): HasMany
|
|
{
|
|
return $this->hasMany(Department::class);
|
|
}
|
|
}
|