PATH:
home
/
centosnipponia
/
public_html
/
ts
/
app
/
Models
<?php namespace App\Models; use App\Models\User; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Factories\HasFactory; class Country extends Model { use HasFactory; protected $table = 'countries'; public function technicalDirectives() { return $this->belongsToMany(TechnicalDirective::class, 'directive_country', 'country_id', 'directive_id'); // by default, Laravel would look for technical_directive_id and country_id, not directive_id and country_id // so, we have to write them explicitly } public function users() { return $this->hasMany(User::class); } }
[+]
..
[-] ReadState.php
[edit]
[-] Message.php
[edit]
[-] motos_vin.php
[edit]
[-] vin_to_case.php
[edit]
[-] MotorModel.php
[edit]
[-] TechnicalDirective.php
[edit]
[-] TechnicalReport.php
[edit]
[-] CaseStatus.php
[edit]
[-] TechnicalCase.php
[edit]
[-] Vin.php
[edit]
[-] Country.php
[edit]
[-] User.php
[edit]
[-] .htaccess.disabled
[edit]