1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- <?php
-
- namespace App\Model;
-
- use Illuminate\Notifications\Notifiable;
- use Jenssegers\Mongodb\Auth\User as Authenticatable;
- use Jenssegers\Mongodb\Eloquent\SoftDeletes;
-
- class Staff extends Authenticatable
- {
- //
- use Notifiable;
- use SoftDeletes;
-
- protected $connection = 'mongodb';
- protected $collection = 'staff';
-
- protected $guarded = ['_id'];
-
- protected $hidden = [
- 'password', 'remember_token',
- ];
-
- public function staffdetail() {
- return $this->hasOne('App\Model\StaffDetail','_id','_id');
- }
-
- public function compound() {
- return $this->hasMany('App\Model\Module\Compound','dikeluarkan','no_badan');
- }
-
- public function confidentialfile() {
- return $this->hasMany('App\Model\Module\ConfidentialFile','penguatkuasa','no_badan');
- }
-
- public function tracklocation(){
- return $this->hasMany('App\Model\Module\TrackLocation');
- }
-
- public function currentlocation(){
- return $this->hasOne('App\Model\Module\CurrentLocation');
- }
-
- public function templatenotice(){
- return $this->hasMany('App\Model\Module\TemplateNotice');
- }
-
- public function notification()
- {
- return $this->hasMany('App\Model\Module\Notification');
- }
-
- public function register_id(){
- return $this->hasMany('App\Model\Module\FirebaseFcmToken');
- }
- }
|