@@ -140,6 +140,8 @@ class CompoundResourceController extends BaseController | |||
$compound = $this->searchCompoundAllWithoutDate($jenis,$modul,$status,$day3, $day7); | |||
} | |||
dd($compound->get()); | |||
if($enforcer == 'All'){ | |||
return $compound; | |||
}else { | |||
@@ -258,6 +260,7 @@ class CompoundResourceController extends BaseController | |||
// }else { | |||
// $department = []; | |||
// } | |||
// ["5df355f891d6e66b9c5e626d","5df721c5cde7fd741433c6b2","5df722a24636f4594f4a3c3d","5f17a31795dbfd3320761bfe","5f3b872fea58cb3c1b0e7b8d"] | |||
// $start_date = ''; | |||
// $end_date = ''; | |||
// // $start_date = '2020-09-29'; |
@@ -1,41 +1,41 @@ | |||
<?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'); | |||
} | |||
} |
@@ -11,7 +11,7 @@ class Compound extends Eloquent | |||
use SoftDeletes; | |||
protected $connection = 'mongodb'; | |||
protected $collection = 'compound'; | |||
protected $collection = 'compound_test'; | |||
protected $guarded = ['_id']; | |||
@@ -8,7 +8,7 @@ class ConfidentialFile extends Eloquent | |||
{ | |||
// | |||
protected $connection = 'mongodb'; | |||
protected $collection = 'confidential_file'; | |||
protected $collection = 'confidential_file_test'; | |||
protected $guarded = ['_id']; | |||
@@ -1,24 +1,24 @@ | |||
<?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'); | |||
} | |||
} |
@@ -1,19 +1,19 @@ | |||
<?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'); | |||
} | |||
} |