23 lines
517 B
PHP
23 lines
517 B
PHP
<?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\SoftDeletes;
|
|
|
|
class Product extends Model
|
|
{
|
|
protected $table = 'product';
|
|
|
|
use HasFactory; use SoftDeletes;
|
|
|
|
protected $fillable = ['name', 'article', 'price', 'quantity'];
|
|
|
|
public function documents(): BelongsToMany
|
|
{
|
|
return $this->belongsToMany(Document::class);
|
|
}
|
|
}
|