| 12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\Factories\HasFactory;
- use Illuminate\Database\Eloquent\Model;
- class Supplier extends Model
- {
- use HasFactory;
- protected $fillable = [
- 'name',
- 'fiscal_code',
- 'vat',
- 'address',
- 'zip_code',
- 'nation_id',
- 'province_id',
- 'city_id',
- 'referent',
- 'website',
- 'phone',
- 'email',
- 'enabled'
- ];
- public function nation()
- {
- return $this->belongsTo(Nation::class);
- }
- public function province()
- {
- return $this->belongsTo(Province::class);
- }
- public function city()
- {
- return $this->belongsTo(City::class);
- }
- }
|