create all azmayesh resources and its dependencies
This commit is contained in:
25
app/Models/AzmayeshType.php
Normal file
25
app/Models/AzmayeshType.php
Normal 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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user