title: store and update in Laravel - which Request to use?
body: <p>I'm new to Laravel and I have problems with storing and updating a Model. </p>
  
  <p>Here is my store method</p>
  
  <pre><code> public function store(Request $request)
  {
  
      $input = Request::all();
  
      Klijent::create($input);
  
      return redirect('klijenti');
  
  }
  </code></pre>
  
  <p>And I have to include <code>use Request;</code> to make it work. </p>
  
  <p>Here is my update method</p>
  
  <pre><code>    public function update(Request $request, $id)
  {
      //
  
      $klijent = Klijent::find($id);
  
      $klijent-&gt;update($request-&gt;all());
  
      return redirect('klijenti/'. $id);
  
  }
  </code></pre>
  
  <p>And I have to include <code>use Illuminate\Http\Request;</code> to make it work. </p>
  
  <p>But if I don't use first one I get this error when using store method:</p>
  
  <pre><code>Non-static method Illuminate\Http\Request::all() should not be called statically, assuming $this from incompatible context
  </code></pre>
  
  <p>If I don't use second one, I get this error when I use update method:</p>
  
  <pre><code>Call to undefined method Illuminate\Support\Facades\Request::all()
  </code></pre>
  
  <p>If I use both of them I get this error:</p>
  
  <pre><code>Cannot use Illuminate\Http\Request as Request because the name is already in use
  </code></pre>