Laravel框架之Response操作


public function response(){

//響應json
/*$data = [
'errCode'=>0,
'errMsg' =>'success',
'data' => 'yxh',
];
return response()->json($data);*/

//重定向
//return redirect('Hello');
//return redirect('Hello')->with('message','yxh');
//return redirect()->action('UserController@Hello')->with('message','yxh');
//return redirect()->route('Hello')->with('message','yxh');

//返回上一個頁面
//return redirect()->back();
}


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM