first commit

This commit is contained in:
amikhaylov
2026-05-27 10:57:53 +03:00
commit 4ebf4ec35f
66 changed files with 11269 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
<?php
declare(strict_types=1);
namespace App\Models\ORM;
use Database\Factories\GigFactory;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\SoftDeletes;
class Gig extends Model
{
use SoftDeletes, HasFactory;
protected $table = 'gigs';
protected $primaryKey = 'id';
protected $fillable = [ 'title', 'description' ];
protected static function newFactory(): GigFactory
{
return GigFactory::new();
}
public function categories(): BelongsToMany
{
return $this->belongsToMany(Category::class, 'gig_category');
}
protected function casts(): array
{
return [
'event_date' => 'datetime',
];
}
}