12345678910111213141516171819202122232425262728293031323334 |
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\Model;
- class Course extends Model
- {
- protected $table = "courses";
- public function destination(){
- return $this->belongsTo('App\Models\Destination','destination_id','id');
- }
- public function institute(){
- return $this->belongsTo('App\Models\Institute','institute_id','id');
- }
- public function level(){
- return $this->belongsTo('App\Models\Level','level_id','id');
- }
- public function campuses(){
- return $this->hasMany('App\Models\CourseCampus','course_id');
- }
- public function tags(){
- return $this->hasMany('App\Models\CourseTag','course_id');
- }
- public function intakes(){
- return $this->hasMany('App\Models\CourseIntake','course_id');
- }
- }
|