title: Type error: Argument 1 passed to Illuminate\Database\Eloquent\Builder::create() must be of the type array, null given
body: <p>i am trying to post title and article in laravel rest api i am getting this error</p>
  
  <blockquote>
    <p>Type error: Argument 1 passed to
    Illuminate\Database\Eloquent\Builder::create() must be of the type
    array, null given, called in
    C:\xampp\htdocs\LaravelProject\cpapi\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Model.php
    on line 1440</p>
  </blockquote>
  
  <p>This is my route/api.php file of post article data</p>
  
  <pre><code>Route::post('articles', 'ArticleController@store');
  
  Route::post('articles', function(Request $request) {
     return Article::create($request-&gt;all);
  });
  </code></pre>
  
  <p>And this store function of  ArticleController.php file</p>
  
  <pre><code> public function store(Request $request)
      {
          $article = Article::create($request-&gt;all());
  
          return response()-&gt;json($article, 201);
      }
  </code></pre>
  
  <p>This is article model class</p>
  
  <pre><code>class Article extends Model
  {
      //new
      protected $fillable = ['title', 'body'];
  }
  </code></pre>
  
  <p>i tried change this in articlecontroller file but getting same error  </p>
  
  <pre><code>$article = Article::create($request-&gt;only([
              'title',
              'body']));
  </code></pre>
  
  <p>How can I solve this issue?</p>