title: How to redirect to my new post when I created a new post | Laravel
body: <p>I want to redirect to my new post when I created a new post in Laravel</p>
  <p>But I get a ArgumentCountError</p>
  <pre><code>Too few arguments to function App\Http\Controllers\ArticlesController::store(), 1 passed in C:\xampp\htdocs\forum\vendor\laravel\framework\src\Illuminate\Routing\Controller.php on line 54 and exactly 2 expected
  </code></pre>
  <p>How can I fix it? Thanks</p>
  <p>web.php</p>
  <pre><code>&lt;?php
  
  Route::resource('articles', ArticlesController::class);
  
  Route::get('/', [ArticlesController::class, 'index'])-&gt;name('root');
  
  Route::resource('articles.comments', CommentsController::class);
  </code></pre>
  <p>ArticlesController.php</p>
  <pre><code>public function store(Request $request, $id) {
      $content = $request-&gt;validate([
          'title' =&gt; 'required|max:30',
          'content' =&gt; 'required|min:10'
      ]);
      
      //限制只有透過登入才能CREATE文章
      auth()-&gt;user()-&gt;articles()-&gt;create($content);
      return redirect('articles/'. $id)-&gt;with('notice', '文章發表成功！');
  }
  </code></pre>
  <p>create.blade.php</p>
  <pre><code>&lt;form class=&quot;container-fluid&quot; action=&quot;{{ route('articles.store') }}&quot; method=&quot;post&quot;&gt;
  </code></pre>