add static azmayesh fields
This commit is contained in:
@@ -16,4 +16,9 @@ class Azmayesh extends Model
|
||||
{
|
||||
return $this->hasMany(AzmayeshSample::class);
|
||||
}
|
||||
|
||||
public function getRouteKeyName(): string
|
||||
{
|
||||
return 'id';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,4 +8,6 @@ use Illuminate\Database\Eloquent\Model;
|
||||
class AzmayeshSample extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $guarded = [];
|
||||
}
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user