title: Laravel displaying/updating data from DB show data in view only status "active" and "deactive" find by $id
body: <p>I tried below code, but it is not working.</p>
  
  <p>In this code, when I entered "DELETED", "id" number in browser "URL" it showing "DELETED" status users details also, I want to show and access only "ACTIVATE" AND "DEACTIVATE" users only if I entered "DELETED" Users "id" in "URL" it should show an error:</p>
  
  <pre class="lang-php prettyprint-override"><code>public function staff_status($id)
  {
      $user = User::where('status', '=', 'ACTIVATE')-&gt;orWhere('status', '=', 'DEACTIVATE')-&gt;find($id);
  
      return view('home', compact('user'));
  }
  
  public function status_update(Request $request, $id)
  {
      $user = User::where('status', '=', 'ACTIVATE') &gt; orWhere('status', '=', 'DEACTIVATE')-&gt;find($id);
  
      $user['status'] = $request-&gt;status;
  
      $user-&gt;save();
  
      return back()-&gt;with('success', 'SUBMITED SUCCESSFULLY .');
  }
  </code></pre>