first commit
This commit is contained in:
22
app/Models/Product.php
Normal file
22
app/Models/Product.php
Normal file
@ -0,0 +1,22 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user