title: Laravel | How to know the Request url comming from
body: <p><strong>hello</strong></p>
  
  <p>i have a form that i can run from different blade but pointing on same Controller</p>
  
  <p>after submiting data i want to know the url or route comming from it the request and then redirect user to an other route </p>
  
  <pre><code>public function store(Request $request) {
  
   $request = $request-&gt;all();
   $new = App\Model::create($request);
   $new-&gt;save();
  
   if ( Request comming from url or route x ) {
       return redirect()-&gt;back();
   } else {
        return redirect()-&gt;route('route');
     }
  </code></pre>
  
  <p>}</p>