| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\Factories\HasFactory;
- use Illuminate\Database\Eloquent\Model;
- class Member extends Model
- {
- use HasFactory;
- protected $fillable = [
- 'first_name',
- 'last_name',
- 'status',
- 'birth_city_id',
- 'birth_province_id',
- 'birth_nation_id',
- 'birth_date',
- 'gender',
- 'address',
- 'zip_code',
- 'fiscal_code',
- 'nation_id',
- 'province_id',
- 'city_id',
- '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);
- }
- public function birth_nation()
- {
- return $this->belongsTo(Nation::class);
- }
- public function birth_province()
- {
- return $this->belongsTo(Province::class);
- }
- public function birth_city()
- {
- return $this->belongsTo(City::class);
- }
- }
|