create all azmayesh resources and its dependencies

This commit is contained in:
2024-10-22 16:40:36 +03:30
parent 9aa3cf320f
commit c2ceb3d343
20 changed files with 548 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\Relations\HasMany;
class AzmayeshType extends Model
{
use HasFactory;
protected $guarded = [];
public function azmayeshes(): HasMany
{
return $this->hasMany(Azmayesh::class);
}
public function azmayeshFields(): BelongsToMany
{
return $this->belongsToMany(AzmayeshField::class);
}
}