$compound = $this->searchCompoundAllWithoutDate($jenis,$modul,$status,$day3, $day7); | $compound = $this->searchCompoundAllWithoutDate($jenis,$modul,$status,$day3, $day7); | ||||
} | } | ||||
dd($compound->get()); | |||||
if($enforcer == 'All'){ | if($enforcer == 'All'){ | ||||
return $compound; | return $compound; | ||||
}else { | }else { | ||||
// }else { | // }else { | ||||
// $department = []; | // $department = []; | ||||
// } | // } | ||||
// ["5df355f891d6e66b9c5e626d","5df721c5cde7fd741433c6b2","5df722a24636f4594f4a3c3d","5f17a31795dbfd3320761bfe","5f3b872fea58cb3c1b0e7b8d"] | |||||
// $start_date = ''; | // $start_date = ''; | ||||
// $end_date = ''; | // $end_date = ''; | ||||
// // $start_date = '2020-09-29'; | // // $start_date = '2020-09-29'; |
<?php | |||||
namespace App\Model\Module; | |||||
use Jenssegers\Mongodb\Eloquent\Model as Eloquent; | |||||
use Jenssegers\Mongodb\Eloquent\SoftDeletes; | |||||
class Attachment extends Eloquent | |||||
{ | |||||
// | |||||
use SoftDeletes; | |||||
protected $connection = 'mongodb'; | |||||
protected $collection = 'attachment'; | |||||
protected $guarded = ['_id']; | |||||
protected $hidden = [ | |||||
'password', 'remember_token', | |||||
]; | |||||
public function memo() { | |||||
return $this->belongsToMany('App\Model\Module\Memo'); | |||||
} | |||||
public function compound() { | |||||
return $this->belongsToMany('App\Model\Module\Compound'); | |||||
} | |||||
public function confidentialfile() { | |||||
return $this->belongsToMany('App\Model\Module\ConfidentialFile'); | |||||
} | |||||
public function iteminventory() { | |||||
return $this->belongsTo('App\Model\Module\ItemInventory'); | |||||
} | |||||
public function templatenotice() { | |||||
return $this->belongsTo('App\Model\Module\TemplateNotice'); | |||||
} | |||||
} | |||||
<?php | |||||
namespace App\Model\Module; | |||||
use Jenssegers\Mongodb\Eloquent\Model as Eloquent; | |||||
use Jenssegers\Mongodb\Eloquent\SoftDeletes; | |||||
class Attachment extends Eloquent | |||||
{ | |||||
// | |||||
use SoftDeletes; | |||||
protected $connection = 'mongodb'; | |||||
protected $collection = 'attachment_test'; | |||||
protected $guarded = ['_id']; | |||||
protected $hidden = [ | |||||
'password', 'remember_token', | |||||
]; | |||||
public function memo() { | |||||
return $this->belongsToMany('App\Model\Module\Memo'); | |||||
} | |||||
public function compound() { | |||||
return $this->belongsToMany('App\Model\Module\Compound'); | |||||
} | |||||
public function confidentialfile() { | |||||
return $this->belongsToMany('App\Model\Module\ConfidentialFile'); | |||||
} | |||||
public function iteminventory() { | |||||
return $this->belongsTo('App\Model\Module\ItemInventory'); | |||||
} | |||||
public function templatenotice() { | |||||
return $this->belongsTo('App\Model\Module\TemplateNotice'); | |||||
} | |||||
} |
use SoftDeletes; | use SoftDeletes; | ||||
protected $connection = 'mongodb'; | protected $connection = 'mongodb'; | ||||
protected $collection = 'compound'; | |||||
protected $collection = 'compound_test'; | |||||
protected $guarded = ['_id']; | protected $guarded = ['_id']; | ||||
{ | { | ||||
// | // | ||||
protected $connection = 'mongodb'; | protected $connection = 'mongodb'; | ||||
protected $collection = 'confidential_file'; | |||||
protected $collection = 'confidential_file_test'; | |||||
protected $guarded = ['_id']; | protected $guarded = ['_id']; | ||||
<?php | |||||
namespace App\Model\Module; | |||||
use Jenssegers\Mongodb\Eloquent\Model as Eloquent; | |||||
class History extends Eloquent | |||||
{ | |||||
// | |||||
protected $connection = 'mongodb'; | |||||
protected $collection = 'history'; | |||||
protected $guarded = ['_id']; | |||||
public function confidentialfile(){ | |||||
// 1: Referrer Parent, 2: Referer Current Class | |||||
return $this->belongsToMany('App\Model\Module\ConfidentialFile'); | |||||
} | |||||
public function subhistory(){ | |||||
// 1: Referrer Parent, 2: Referer Current Class | |||||
return $this->hasMany('App\Model\Module\SubHistory'); | |||||
} | |||||
} | |||||
<?php | |||||
namespace App\Model\Module; | |||||
use Jenssegers\Mongodb\Eloquent\Model as Eloquent; | |||||
class History extends Eloquent | |||||
{ | |||||
// | |||||
protected $connection = 'mongodb'; | |||||
protected $collection = 'history_test'; | |||||
protected $guarded = ['_id']; | |||||
public function confidentialfile(){ | |||||
// 1: Referrer Parent, 2: Referer Current Class | |||||
return $this->belongsToMany('App\Model\Module\ConfidentialFile'); | |||||
} | |||||
public function subhistory(){ | |||||
// 1: Referrer Parent, 2: Referer Current Class | |||||
return $this->hasMany('App\Model\Module\SubHistory'); | |||||
} | |||||
} |
<?php | |||||
namespace App\Model\Module; | |||||
use Jenssegers\Mongodb\Eloquent\Model as Eloquent; | |||||
class SubHistory extends Eloquent | |||||
{ | |||||
// | |||||
protected $connection = 'mongodb'; | |||||
protected $collection = 'sub_history'; | |||||
protected $guarded = ['_id']; | |||||
public function history(){ | |||||
// 1: Referrer Parent, 2: Referer Current Class | |||||
return $this->belongsToMany('App\Model\Module\History'); | |||||
} | |||||
} | |||||
<?php | |||||
namespace App\Model\Module; | |||||
use Jenssegers\Mongodb\Eloquent\Model as Eloquent; | |||||
class SubHistory extends Eloquent | |||||
{ | |||||
// | |||||
protected $connection = 'mongodb'; | |||||
protected $collection = 'sub_history_test'; | |||||
protected $guarded = ['_id']; | |||||
public function history(){ | |||||
// 1: Referrer Parent, 2: Referer Current Class | |||||
return $this->belongsToMany('App\Model\Module\History'); | |||||
} | |||||
} |