32 lines
572 B
PHP
32 lines
572 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Payroll extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $fillable = [
|
|
'employee_id',
|
|
'period',
|
|
'basic_salary',
|
|
'details',
|
|
'net_salary',
|
|
'status',
|
|
];
|
|
|
|
protected $casts = [
|
|
'details' => 'array',
|
|
'basic_salary' => 'integer',
|
|
'net_salary' => 'integer',
|
|
];
|
|
|
|
public function employee()
|
|
{
|
|
return $this->belongsTo(Employee::class);
|
|
}
|
|
}
|