| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <?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',
- 'referent_first_name',
- 'referent_last_name',
- 'referent_email',
- 'referent_phone',
- 'referent_mobile',
- 'enabled',
- 'archived',
- ];
- public function nation()
- {
- return $this->belongsTo(\App\Models\Nation::class);
- }
- public function province()
- {
- return $this->belongsTo(\App\Models\Province::class);
- }
- public function city()
- {
- return $this->belongsTo(\App\Models\City::class);
- }
- }
|