title: Argument 1 passed to Illuminate\Database\Eloquent\Builder::create() must be of the type array, null given
body: <p>I'm using laravel 5.4,
  And I need to open an endpoint for 'createUser'.</p>
  
  <p>"LoginController.php" </p>
  
  <pre><code>public function createUser(Request $request)
  {
      $data=$request-&gt;only('email','name','position');
      $validate=Validator::make($data, [
          'email' =&gt; 'required|email|unique:users',
          'name' =&gt; 'required',
          'position' =&gt; 'required',
      ]);
  
      $exUser=User::where('email','=',$request['email'])-&gt;first();
      $nameUser=User::where('name','=',$request['name'])-&gt;first();
  
      if(empty($exUser))
      {
          if(empty($nameUser))
          {
              $user=new User();
              $user-&gt;name=$request['name'];
              $user-&gt;email=$request['email'];
              $user-&gt;position=$request['position'];
              $user-&gt;password=hash('sha512',$request['password']);
              $user-&gt;save();
          }
          else
          {
              return response()-&gt;json(['Name Has Already Taken'],500);
          }
  
      }
      else
      {
          return response()-&gt;json(['Email Has Already Taken'],500);
      }
  }
  </code></pre>
  
  <p>"RegisterController.php"</p>
  
  <pre><code>    protected function create(array $data)
  {
      return User::create([
          'name' =&gt; $data['name'],
          'email' =&gt; $data['email'],
          'position' =&gt; $data['position'],
          'password' =&gt; bcrypt($data['password'])
      ]);
  }
  </code></pre>
  
  <p>"api.php"</p>
  
  <pre><code>&lt;?php
  
  use App\User;
  use Illuminate\Http\Request;
  
       Route::get('users',['as' =&gt; 'user', 'uses' 
       =&gt;'Auth\LoginController@getUsers']);
  
      Route::post('users', ['as' =&gt; 'createUser', 'uses' =&gt; 
      'Auth\LoginController@createUser']);
  </code></pre>
  
  <p>"User.php"</p>
  
  <pre><code>&lt;?php
  
  namespace App;
  use Illuminate\Database\Eloquent\Model;
  use Illuminate\Notifications\Notifiable;
  use Illuminate\Foundation\Auth\User as Authenticatable;
  
  class User extends Authenticatable
  {
      use Notifiable;
  
      protected $fillable = [
          'name', 'email', 'position' ,'password'
      ];
  
      protected $hidden = [
          'password', 'remember_token',
      ];
  }
  </code></pre>
  
  <p>"postman details"
  <a href="https://i.stack.imgur.com/OW2Kh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OW2Kh.png" alt="enter image description here"></a></p>
  
  <p>The get "users" endpoint is working!
  But when Im trying to call the "post" request using postman,It shows the error</p>
  
  <p>"Argument 1 passed to Illuminate\Database\Eloquent\Builder::create() must be of the type array, null given, called in C:\xamppnew\htdocs\blog\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Model.php on line 1374 and defined" </p>
  
  <p>Any suggestions!</p>