jeudi 11 avril 2019

Laravel How I can return view data with respone json (both in 1 time)?

public function index(Request $request)
{
    $search_book = $request->id;

    $proc=DB::select(DB::raw("SELECT * FROM BOOKS WHERE BOOKID = '$Search_book'")

    if ($search_book!="") {
        return response()->json($proc);
        return view('status.status',[ 
          'proc' => $proc
    ]);
}

How to return 2 data



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire