title: Upload image with Laravel 6
body: <p>I'm trying to upload an image but when I submit the form nothing happens at all. I end up with an empty image folder and a <code>null</code> image field in the database. I already tried many potential solutions online up until this point.</p>
  
  <p><strong>Controller</strong></p>
  
  <pre class="lang-php prettyprint-override"><code>class ReportsController extends Controller
  {
      /**
       * Only logged in users can access reports.
       */
  
      public function __construct()
      {
          $this-&gt;middleware('auth');
      }
  
      public function index()
      {
          $reports = Report::with(['victim', 'lost_vehicle'])-&gt;get();
          return view('reports.index')-&gt;with('reports', $reports);
      }
  
      public function create()
      {
          return view('reports.create');
      }
  
      public function store(ReportRequest $request)
      {
          $userid = Auth::user()-&gt;id;
          request()-&gt;validate([
              // 'image' =&gt; 'required|image|mimes:jpeg,png,jpg,gif,svg',
          ]);
          $victim = Victim::create([
              'vic_name' =&gt; $request-&gt;input('name'),
              'vic_statment' =&gt; $request-&gt;input('statment'),
              'case_id' =&gt; uniqid(),
              'report_status' =&gt; $request-&gt;input('status'),
              'user_id' =&gt; $userid,
          ]);
  
          if ($files = $request-&gt;file('image')) {
              $carImage = time().'.'.$files-&gt;getClientOriginalExtension();
              $request-&gt;image-&gt;move(public_path('images'), $carImage);
              $victim-&gt;lost_vehicles()-&gt;create([
                  'image' =&gt; $carImage,
              ]);
          }
          $victim-&gt;lost_vehicles()-&gt;create([
              'type' =&gt; $request-&gt;input('type'),
              'model' =&gt; $request-&gt;input('model'),
              'production_year' =&gt; $request-&gt;input('year'),
              'color' =&gt; $request-&gt;input('color'),
              'value' =&gt; $request-&gt;input('value'),
              'marks' =&gt; $request-&gt;input('marks'),
              'plate_number' =&gt; $request-&gt;input('plate'),
              'chassis_number' =&gt; $request-&gt;input('chassis'),
              'last_location' =&gt; $request-&gt;input('location'),
              'last_time_spotted' =&gt; $request-&gt;input('last_time_spotted'),
              'victim_id' =&gt; $victim-&gt;id,
          ]);
  
          return dd($victim);
      }
  }
  </code></pre>
  
  <p>I set the form to accept files <code>{!! Form::open(['url'=&gt;'reports'], array('files'=&gt; true)) !!}</code>.</p>