1234567891011121314151617181920212223 |
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\Model;
- //use Illuminate\Database\Eloquent\SoftDeletes;
- class MarketCountry extends Model{
- //use SoftDeletes;
- protected $guarded=['id'];
- public function country(){
- return $this->belongsTo('App\Country','country_id','id');
- }
-
- public function related_univiersities(){
- return $this->hasMany('App\Models\University', 'country_id', 'country_id');
- }
- }
|