title: Laravel - Method Illuminate\Http\Request::request does not exist
body: <p>I have created a view to create new courses 'create.blade.php'. And I am trying to store this data in the DB however I am getting the following error:</p>
  
  <blockquote>
    <p>BadMethodCallException Method Illuminate\Http\Request::request does
    not exist.</p>
  </blockquote>
  
  <p>I am not sure what is causing the error as I have referred to the the request namespace in my controller. See below;</p>
  
  <p>CoursesController.php;</p>
  
  <pre><code>&lt;?php
  
  namespace App\Http\Controllers\Admin;
  
  use Gate;
  use App\User;
  use App\Course;
  use Illuminate\Http\Request;
  use App\Http\Controllers\Controller;
  use Illuminate\Support\Facades\Input;
  
  
  class CoursesController extends Controller
  {
      public function __construct()
      {
          //calling auth middleware to check whether user is logged in, if no logged in user they will be redirected to login page
          $this-&gt;middleware('auth');
      }
  
      public function index()
      {
          if(Gate::denies('manage_courses')){
              return redirect(route('home'));
          }
  
          $courses = Course::all();
          return view('admin.course.index')-&gt;with('course', $courses); //pass data down to view
      }
  
      public function create()
      {
          if(Gate::denies('create_courses')){
              return redirect(route('home'));
          }
  
          $courses = Course::all()-&gt;pluck('title');
          $instructors = User::all()-&gt;pluck('name', 'id'); //defining instructor variable 
  
          return view('admin.course.create', compact('instructors')); //passing instructor to view
      }
  
      public function store(Request $request)
      {
          $course = Course::create($request-&gt;all()); //request all the data fields to store in DB
          $course-&gt;courses()-&gt;sync($request-&gt;request('courses', [])); //
  
          if($course-&gt;save()){
              $request-&gt;session()-&gt;flash('success', 'The course ' . $course-&gt;title . ' has been created successfully.');
          }else{
              $request-&gt;session()-&gt;flash('error', 'There was an error creating the course');
          }
  
          return redirect()-&gt;route ('admin.courses.index');
      }
  
  }
  </code></pre>
  
  <p>Create.blade.php</p>
  
  <pre><code>@extends('layouts.app')
  
  @section('content')
      &lt;div class="row justify-content-center"&gt;
          &lt;div class="col-md-8"&gt;
              &lt;div class="card"&gt;
                  &lt;div class="card-header"&gt;Create Course&lt;/div&gt;
                  &lt;div class="card-body"&gt;
  
                          &lt;form method="POST" action="{{ route('admin.courses.store') }}" enctype="multipart/form-data"&gt;
                              @csrf
  
                              &lt;div class="form-group"&gt;
                                      &lt;label class="required" for="name"&gt;Course Title&lt;/label&gt;
                                      &lt;input class="form-control {{ $errors-&gt;has('title') ? 'is-invalid' : '' }}" type="text" name="title" id="id" value="{{ old('title', '') }}" required&gt;
                                      @if($errors-&gt;has('name'))
                                      &lt;div class="invalid-feedback"&gt;
                                          {{ $errors-&gt;first('name') }}
                                      &lt;/div&gt;
                                  @endif
                              &lt;/div&gt;
  
                              &lt;div class="form-group"&gt;
                                      @if (Auth::user()-&gt;isAdmin())
                                              {!! Form::label('Instructor', 'Instructor', ['class' =&gt; 'control-label']) !!}
                                              {!! Form::select('Instructor[]', $instructors, Input::get('Instructor'), ['class' =&gt; 'form-control select2', 'multiple' =&gt; 'multiple']) !!} 
                                              @if($errors-&gt;has('Instructor'))
                                                      {{ $errors-&gt;first('Instructor') }}
                                                  &lt;/p&gt;
                                              @endif
                              &lt;/div&gt;
  
  
                              &lt;div class="form-group"&gt;
                              &lt;button class="btn btn-danger" type="submit"&gt;
                                  Save
                              &lt;/button&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                       @endif
                      &lt;/form&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
              @endsection
  </code></pre>
  
  <p>I am new to laravel so i would appreciate any help. Thanks.</p>