|
@@ -345,6 +345,8 @@ class FeaturesController extends BaseController
|
345
|
345
|
if(!$this->startsWith($menu['url'],'http') && $menu['url'] !='None' && $menu['url']!=''){
|
346
|
346
|
$menu['url']=config('constants.HOST_URL').$menu['url'];
|
347
|
347
|
}
|
|
348
|
+ $menu=json_decode(json_encode($menu),true);
|
|
349
|
+ $menu['tags']=trim($menu['tags']);
|
348
|
350
|
$initArr=array();
|
349
|
351
|
$initArr[]=$id;
|
350
|
352
|
$readArr=Menu::getReadNum($initArr);
|
|
@@ -361,10 +363,7 @@ class FeaturesController extends BaseController
|
361
|
363
|
}
|
362
|
364
|
$init=array();
|
363
|
365
|
$list=explode(';',$menu['ingredients']);
|
364
|
|
- foreach($list as $item){
|
365
|
|
- $origin=explode(',',$item);
|
366
|
|
- $init[$origin[0]]=$origin[1];
|
367
|
|
- }
|
|
366
|
+ $init=Menu::formatStr($list);
|
368
|
367
|
$menu['ingredients']=$init;
|
369
|
368
|
$token = $request->headers->get('token');
|
370
|
369
|
if($token==''){
|
|
@@ -386,7 +385,7 @@ class FeaturesController extends BaseController
|
386
|
385
|
}
|
387
|
386
|
}
|
388
|
387
|
}
|
389
|
|
- $menuDetail=DB::table('menu_step')->where('menu_id',$id)->get();
|
|
388
|
+ $menuDetail=DB::table('menu_step')->select('step','url')->where('menu_id',$id)->get();
|
390
|
389
|
$menuDetail=json_decode(json_encode($menuDetail),true);
|
391
|
390
|
foreach($menuDetail as $key=>$value){
|
392
|
391
|
if(!$this->startsWith($value['url'],'http') && $value['url'] !='None' && $value['url']!=''){
|