add static azmayesh fields

This commit is contained in:
2024-10-23 15:54:01 +03:30
parent c2ceb3d343
commit e9098b0a55
12 changed files with 137 additions and 18 deletions

View File

@@ -16,4 +16,9 @@ class Azmayesh extends Model
{
return $this->hasMany(AzmayeshSample::class);
}
public function getRouteKeyName(): string
{
return 'id';
}
}

View File

@@ -8,4 +8,6 @@ use Illuminate\Database\Eloquent\Model;
class AzmayeshSample extends Model
{
use HasFactory;
protected $guarded = [];
}

View File

@@ -20,6 +20,6 @@ class AzmayeshType extends Model
public function azmayeshFields(): BelongsToMany
{
return $this->belongsToMany(AzmayeshField::class);
return $this->belongsToMany(AzmayeshField::class,'azmayesh_field_azmayesh_type');
}
}