title: I see this error when I trying to update my post in my blog project in Laravel 8 'Creating default object from empty value', what does that mean?
body: <p>when I trying to edit my post in blog project then above error is occured.
  that is my code:</p>
  <pre><code>public function update(Request $request)
      {
          // 
      $data = Post::find($request-&gt;id);
      $data-&gt;title = $request-&gt;input('title');
      $data-&gt;description = $request-&gt;input('description');
      $data-&gt;update();
        return redirect('/index')-&gt;withMessage('successfully published');
      }
  </code></pre>
  <p>And that is my routes-</p>
  <p>Route::get('posts/edit/{edit}',[PostController::class,'edit']);</p>
  <p>Route::post('/update',[PostController::class,'update']);</p>