first commit
This commit is contained in:
26
app/Models/DepartmentProfile.php
Normal file
26
app/Models/DepartmentProfile.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user