laravel5.3怎么返回json格式的数据表加上 "succes":1
publicfunctionpostdata(){$input=Input::all();$users=User::where('id','=',1)->get();$a...
public function postdata()
{
$input=Input::all();
$users=User::where('id', '=', 1)->get();
$a=["success"=>1,"input"=>$input, "data"=>$users];
return $a;
} 展开
{
$input=Input::all();
$users=User::where('id', '=', 1)->get();
$a=["success"=>1,"input"=>$input, "data"=>$users];
return $a;
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询