|
@@ -103,6 +103,12 @@ class InfoCategoryLogic
|
|
|
*/
|
|
*/
|
|
|
public function detail($params)
|
|
public function detail($params)
|
|
|
{
|
|
{
|
|
|
- return InfoCategory::find($params['id'])->toArray();
|
|
|
|
|
|
|
+ $info = InfoCategory::find($params['id']);
|
|
|
|
|
+ if($info){
|
|
|
|
|
+ return $info->toArray();
|
|
|
|
|
+ }
|
|
|
|
|
+ else{
|
|
|
|
|
+ return [];
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|