<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Article extends Model
{
    protected $fillable = [
    'name','description','quantity','price','code','image','category_id'
    ];

    protected $with = [
        'category'
    ];

    public function category(){
        return $this->belongsTo('App\Models\Categorie');
    }
}
