Dashboard sipadu mbip
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Staff.php 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. namespace App\Model;
  3. use Illuminate\Notifications\Notifiable;
  4. use Jenssegers\Mongodb\Auth\User as Authenticatable;
  5. use Jenssegers\Mongodb\Eloquent\SoftDeletes;
  6. class Staff extends Authenticatable
  7. {
  8. //
  9. use Notifiable;
  10. use SoftDeletes;
  11. protected $connection = 'mongodb';
  12. protected $collection = 'staff';
  13. protected $guarded = ['_id'];
  14. protected $hidden = [
  15. 'password', 'remember_token',
  16. ];
  17. public function staffdetail() {
  18. return $this->hasOne('App\Model\StaffDetail','_id','_id');
  19. }
  20. public function compound() {
  21. return $this->hasMany('App\Model\Module\Compound','dikeluarkan','no_badan');
  22. }
  23. public function confidentialfile() {
  24. return $this->hasMany('App\Model\Module\ConfidentialFile','penguatkuasa','no_badan');
  25. }
  26. public function tracklocation(){
  27. return $this->hasMany('App\Model\Module\TrackLocation');
  28. }
  29. public function currentlocation(){
  30. return $this->hasOne('App\Model\Module\CurrentLocation');
  31. }
  32. public function templatenotice(){
  33. return $this->hasMany('App\Model\Module\TemplateNotice');
  34. }
  35. public function notification()
  36. {
  37. return $this->hasMany('App\Model\Module\Notification');
  38. }
  39. public function register_id(){
  40. return $this->hasMany('App\Model\Module\FirebaseFcmToken');
  41. }
  42. }