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.

Form.php 1.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. namespace App\Model;
  3. use Jenssegers\Mongodb\Eloquent\Model as Eloquent;
  4. use Jenssegers\Mongodb\Eloquent\SoftDeletes;
  5. class Form extends Eloquent {
  6. //
  7. use SoftDeletes;
  8. protected $connection = 'mongodb';
  9. protected $collection = 'form_submitted';
  10. // protected $guarded = ['_id'];
  11. protected $fillable = ['_id','type_service','type_application','project_type','status_payment','status_email','remark_form','created_at'];
  12. public function staff() {
  13. return $this->belongsTo('App\Model\Staff','_id','dealer_id');
  14. }
  15. public function subscriber() {
  16. return $this->hasOne('App\Model\Subscriber','_id','_id');
  17. }
  18. public function packagedetail(){
  19. return $this->hasOne('App\Model\PackageDetail','_id','_id');
  20. }
  21. public function workorder(){
  22. return $this->hasOne('App\Model\WorkOrder','_id','_id');
  23. }
  24. public function formstatus(){
  25. return $this->hasMany('App\Model\FormStatus','form_id','_id');
  26. }
  27. public function company(){
  28. return $this->belongsTo('App\Model\Company','_id','company_id');
  29. }
  30. }