title: Laravel How I can return view data with respone json (both in 1 time)?
body: <pre><code>public function index(Request $request)
  {
      $search_book = $request-&gt;id;
  
      $proc=DB::select(DB::raw("SELECT * FROM BOOKS WHERE BOOKID = '$Search_book'")
  
      if ($search_book!="") {
          return response()-&gt;json($proc);
          return view('status.status',[ 
            'proc' =&gt; $proc
      ]);
  }
  </code></pre>
  
  <p>How to return 2 data</p>