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

  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Factories\HasFactory;
  4. use Illuminate\Database\Eloquent\Model;
  5. class Instruction extends Model
  6. {
  7. use HasFactory;
  8. /**
  9. * The attributes that are mass assignable.
  10. *
  11. * @var array
  12. */
  13. protected $fillable = [
  14. 'page_id',
  15. 'framework_id',
  16. 'file_path',
  17. ];
  18. /**
  19. * Get the attributes that should be cast.
  20. *
  21. * @return array<string, string>
  22. */
  23. protected function casts(): array
  24. {
  25. return [
  26. 'page_id' => 'integer',
  27. 'framework_id' => 'integer',
  28. ];
  29. }
  30. /**
  31. * Get the framework associated with the instruction.
  32. */
  33. public function framework()
  34. {
  35. return $this->belongsTo(Framework::class);
  36. }
  37. }