title: Undefined variable: vaccine_feed (View: C:\xampp\htdocs\webapp\resources\views\addstock.blade.php)
body: <p>I'm getting an undefined variable when trying to pass data from my controller to a view from a database.</p>
  
  <pre><code>Part of my Controller:
  public function index()
      {
        $vaccine_feed = Vaccines::All();
          return view('welcome', [
            'vaccines' =&gt; $vaccines,
            'user' =&gt; $user,
            'vaccine_feed' =&gt; $vaccine_feed
          ]);
      }
  
  
  
  
  View:
  
  foreach($vaccine_feed as $vaccines ) {
  
  }
  </code></pre>
  
  <p>I've added my routes below, if that helps at all</p>
  
  <pre><code>Auth::routes();
  Route::get('/', function () {
      return view('welcome');
  });
  Route::get('/home', 'HomeController@index')-&gt;name('home');
  
  Route::get('/logout', function () {
      Auth::logout();
      Session::flush();
      return view('welcome');
  });
  
  
  Route::get('/addstock', 'AddForm@getStockForm');
  Route::post('/addstock', 'AddForm@postStockForm');
  </code></pre>