ldc-agis/app/Models/Joinuspage.php

43 lines
1 KiB
PHP
Raw Permalink Normal View History

2023-12-19 15:09:12 +00:00
<?php
namespace App\Models;
use App\Traits\Models\ActivityLog;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
/**
* @property string $video_id Id of the youtube video to display.
* @property-read \Carbon\Carbon $created_at Created date.
* @property-read \Carbon\Carbon $updated_at Updated date.
*/
class Joinuspage extends Model
{
use ActivityLog;
use HasFactory;
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
'video_id',
];
/**
* Perform any actions required after the model boots.
*
* @return void
*/
protected static function booted(): void
{
static::creating(function () {
throw new \RuntimeException("Creating a new page is not authorized");
});
static::deleting(function () {
throw new \RuntimeException('Deleting a page is not authorized');
});
}
}