| 12345678910111213141516171819202122232425262728 |
- <?php
-
- namespace App\LatestModel\Module;
-
- use Jenssegers\Mongodb\Eloquent\Model as Eloquent;
- use Jenssegers\Mongodb\Eloquent\SoftDeletes;
-
- class Company extends Eloquent {
- //
- use SoftDeletes;
-
- protected $connection = 'mongodb';
- protected $collection = 'company';
-
- protected $guarded = ['_id'];
-
- public function staff() {
- return $this->hasMany('App\LatestModel\Staff','company_id','_id');
- }
-
- public function workorder() {
- return $this->hasMany('App\LatestModel\Module\WorkOrder','contractor_id','_id');
- }
-
- public function form() {
- return $this->hasMany('App\LatestModel\Module\Form','company_id','_id');
- }
- }
|