April 2026 waren Wirtschaft Feedback
This commit is contained in:
parent
02f2a4c23e
commit
9ce711d6b2
167 changed files with 25278 additions and 8518 deletions
32
app/Models/SupplierCategory.php
Normal file
32
app/Models/SupplierCategory.php
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Database\Factories\SupplierCategoryFactory;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
|
||||
class SupplierCategory extends Model
|
||||
{
|
||||
/** @use HasFactory<SupplierCategoryFactory> */
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'pos',
|
||||
];
|
||||
|
||||
/**
|
||||
* @return BelongsToMany<Supplier, $this>
|
||||
*/
|
||||
public function suppliers(): BelongsToMany
|
||||
{
|
||||
return $this->belongsToMany(
|
||||
Supplier::class,
|
||||
'supplier_supplier_category',
|
||||
'supplier_category_id',
|
||||
'supplier_id'
|
||||
)->withTimestamps();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue