first change
This commit is contained in:
37
Modules/Employee/app/Models/Designation.php
Normal file
37
Modules/Employee/app/Models/Designation.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Employee\Models;
|
||||
|
||||
use App\Models\User;
|
||||
use App\Traits\CreatedUpdatedBy;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Modules\Employee\Database\Factories\DesignationFactory;
|
||||
|
||||
class Designation extends Model
|
||||
{
|
||||
use HasFactory, CreatedUpdatedBy;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*/
|
||||
protected $fillable = [
|
||||
'title',
|
||||
'slug',
|
||||
'status',
|
||||
'order',
|
||||
'department_id',
|
||||
'createdby',
|
||||
'updatedby',
|
||||
];
|
||||
|
||||
public function department()
|
||||
{
|
||||
return $this->belongsTo(Department::class, 'department_id');
|
||||
}
|
||||
|
||||
protected static function newFactory(): DesignationFactory
|
||||
{
|
||||
return DesignationFactory::new();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user