add translate api
This commit is contained in:
parent
e042836c60
commit
2e0425490d
|
|
@ -22,8 +22,8 @@ class InformasiyaUslugahController extends Controller
|
|||
|
||||
public function index(){
|
||||
|
||||
$data = $this->InformasiyaObUslugah->all()->toArray();
|
||||
|
||||
// $data = $this->InformasiyaObUslugah->all()->toArray();
|
||||
$data = $this->InformasiyaObUslugah->with(['translations:locale,model_id,attribute_data'])->get();;
|
||||
return $this->helpers->apiArrayResponseBuilder(200, 'success', $data);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,9 @@ class StrukturaSentraController extends Controller
|
|||
|
||||
public function index(){
|
||||
|
||||
$data = $this->StrukturaSentra->all()->toArray();
|
||||
// $data = $this->StrukturaSentra->all()->toArray();
|
||||
$data = $this->StrukturaSentra->with(['translations:locale,model_id,attribute_data'])->get();
|
||||
|
||||
|
||||
return $this->helpers->apiArrayResponseBuilder(200, 'success', $data);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,9 @@ class reestrController extends Controller
|
|||
|
||||
public function index(){
|
||||
|
||||
$data = $this->ReestrMeasureInstrument->all()->toArray();
|
||||
// $data = $this->ReestrMeasureInstrument->all()->toArray();
|
||||
$data = $this->ReestrMeasureInstrument->paginate(50);
|
||||
|
||||
|
||||
return $this->helpers->apiArrayResponseBuilder(200, 'success', $data);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,4 +26,8 @@ class InformasiyaObUslugah extends Model
|
|||
*/
|
||||
public $rules = [
|
||||
];
|
||||
|
||||
public $implement = ['RainLab.Translate.Behaviors.TranslatableModel'];
|
||||
|
||||
public $translatable = ['kind_of_activity','documents_for_employers','order','cost_of_work'];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,4 +26,8 @@ class StrukturaSentra extends Model
|
|||
*/
|
||||
public $rules = [
|
||||
];
|
||||
|
||||
public $implement = ['RainLab.Translate.Behaviors.TranslatableModel'];
|
||||
|
||||
public $translatable = ['name','position_held','phone'];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue