You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
804 B
43 lines
804 B
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Instruction extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
/**
|
|
* The attributes that are mass assignable.
|
|
*
|
|
* @var array
|
|
*/
|
|
protected $fillable = [
|
|
'page_id',
|
|
'framework_id',
|
|
'file_path',
|
|
];
|
|
|
|
/**
|
|
* Get the attributes that should be cast.
|
|
*
|
|
* @return array<string, string>
|
|
*/
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'page_id' => 'integer',
|
|
'framework_id' => 'integer',
|
|
];
|
|
}
|
|
|
|
/**
|
|
* Get the framework associated with the instruction.
|
|
*/
|
|
public function framework()
|
|
{
|
|
return $this->belongsTo(Framework::class);
|
|
}
|
|
}
|