12345678910111213141516171819202122232425262728293031323334353637383940 |
- <?php
-
- namespace App\Model\Module;
-
- use Illuminate\Notifications\Notifiable;
- use Jenssegers\Mongodb\Eloquent\Model as Eloquent;
- use Jenssegers\Mongodb\Eloquent\SoftDeletes;
-
- use App\Model\Staff;
-
- class Department extends Eloquent
- {
- //
- use Notifiable;
- use SoftDeletes;
-
- protected $connection = 'mongodb';
- protected $collection = 'department';
-
- protected $guarded = ['_id'];
-
- public function staffdetail()
- {
- return $this->belongsToMany('App\Model\StaffDetail');
- }
-
- public function templatenotice(){
- return $this->hasMany('App\Model\Module\TemplateNotice');
- }
-
- public function deedlaw()
- {
- return $this->belongsToMany('App\Model\Module\DeedLaw');
- }
-
- public function faulty()
- {
- return $this->belongsToMany('App\Model\Module\Faulty');
- }
- }
|