48 lines
1.1 KiB
PHP
48 lines
1.1 KiB
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Models;
|
||
|
|
|
||
|
|
use App\Models\Traits\ChaturmasDate\Attributes\ChaturmasDateAttributes;
|
||
|
|
use App\Models\Traits\ChaturmasDate\Methods\ChaturmasDateMethods;
|
||
|
|
use App\Models\Traits\ChaturmasDate\Relationships\ChaturmasDateRelationships;
|
||
|
|
use App\Models\Traits\ChaturmasDate\Scopes\ChaturmasDateScope;
|
||
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||
|
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
|
||
|
|
class ChaturmasDate extends Model
|
||
|
|
{
|
||
|
|
use HasFactory, ChaturmasDateRelationships, ChaturmasDateAttributes, ChaturmasDateScope, ChaturmasDateMethods;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* The attributes that are mass assignable.
|
||
|
|
*
|
||
|
|
* @var array
|
||
|
|
*/
|
||
|
|
protected $fillable = [
|
||
|
|
'year',
|
||
|
|
'from',
|
||
|
|
'to',
|
||
|
|
'created_by',
|
||
|
|
'updated_by',
|
||
|
|
];
|
||
|
|
|
||
|
|
/**
|
||
|
|
* The attributes that should be cast to native types.
|
||
|
|
*
|
||
|
|
* @var array
|
||
|
|
*/
|
||
|
|
protected $casts = [
|
||
|
|
'id' => 'integer',
|
||
|
|
'created_by' => 'integer',
|
||
|
|
'updated_by' => 'integer',
|
||
|
|
];
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @return mixed
|
||
|
|
*/
|
||
|
|
public function chaturmas()
|
||
|
|
{
|
||
|
|
return $this->hasMany(Chaturmas::class, 'chaturmas_date_id');
|
||
|
|
}
|
||
|
|
}
|