title: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'app.articles' doesn't exist (SQL: select * from `articles`)
body: <p>I was trying to create my db to laravel application but getting this error.
  I was following this <a href="https://www.youtube.com/watch?v=xIBST5vVq84&amp;list=PLkceZXjwpt79ktt5N6ojNVAM-lzTWa1W5" rel="nofollow noreferrer">here</a> tutorial.</p>
  
  <p>I am unable to access my article database but i can access anything from User.php predefined model.</p>
  
  <p>route.php </p>
  
  <pre><code>use App\article;
  /*
  |--------------------------------------------------------------------------
  | Application Routes
  |--------------------------------------------------------------------------
  |
  | Here is where you can register all of the routes for an application.
  | It's a breeze. Simply tell Laravel the URIs it should respond to
  | and give it the controller to call when that URI is requested.
  |
  */
  
  Route::get('/', function () {
      return view('welcome');
  });
  
  Route::get('article', function () {
      echo article::all();
  });
  </code></pre>
  
  <p>article.php</p>
  
  <pre><code>&lt;?php
  
  namespace App;
  
  use Illuminate\Database\Eloquent\Model;
  
  class article extends Model
  {
  
  }
  </code></pre>
  
  <p></p>
  
  <p></p>
  
  <pre><code>in Connection.php line 673
  at Connection-&gt;runQueryCallback('select * from `articles`', array(), object(Closure)) in Connection.php line 629
  at Connection-&gt;run('select * from `articles`', array(), object(Closure)) in Connection.php line 342
  at Connection-&gt;select('select * from `articles`', array(), true) in Builder.php line 1508
  at Builder-&gt;runSelect() in Builder.php line 1494
  at Builder-&gt;get(array('*')) in Builder.php line 596
  at Builder-&gt;getModels(array('*')) in Builder.php line 303
  at Builder-&gt;get(array('*')) in compiled.php line 10366
  at Model::all() in routes.php line 20
  at RouteServiceProvider-&gt;{closure}()
  at call_user_func_array(object(Closure), array()) in compiled.php line 8415
  at Route-&gt;runCallable(object(Request)) in compiled.php line 8405
  at Route-&gt;run(object(Request)) in compiled.php line 8121
  at Router-&gt;Illuminate\Routing\{closure}(object(Request))
  at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52
  at Pipeline-&gt;Illuminate\Routing\{closure}(object(Request)) in compiled.php line 3176
  at VerifyCsrfToken-&gt;handle(object(Request), object(Closure))
  at call_user_func_array(array(object(VerifyCsrfToken), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9838
  at Pipeline-&gt;Illuminate\Pipeline\{closure}(object(Request))
  at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
  at Pipeline-&gt;Illuminate\Routing\{closure}(object(Request)) in compiled.php line 13274
  at ShareErrorsFromSession-&gt;handle(object(Request), object(Closure))
  at call_user_func_array(array(object(ShareErrorsFromSession), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9838
  at Pipeline-&gt;Illuminate\Pipeline\{closure}(object(Request))
  at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
  at Pipeline-&gt;Illuminate\Routing\{closure}(object(Request)) in compiled.php line 11822
  at StartSession-&gt;handle(object(Request), object(Closure))
  at call_user_func_array(array(object(StartSession), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9838
  at Pipeline-&gt;Illuminate\Pipeline\{closure}(object(Request))
  at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
  at Pipeline-&gt;Illuminate\Routing\{closure}(object(Request)) in compiled.php line 13009
  at AddQueuedCookiesToResponse-&gt;handle(object(Request), object(Closure))
  at call_user_func_array(array(object(AddQueuedCookiesToResponse), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9838
  at Pipeline-&gt;Illuminate\Pipeline\{closure}(object(Request))
  at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
  at Pipeline-&gt;Illuminate\Routing\{closure}(object(Request)) in compiled.php line 12946
  at EncryptCookies-&gt;handle(object(Request), object(Closure))
  at call_user_func_array(array(object(EncryptCookies), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9838
  at Pipeline-&gt;Illuminate\Pipeline\{closure}(object(Request))
  at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
  at Pipeline-&gt;Illuminate\Routing\{closure}(object(Request))
  at call_user_func(object(Closure), object(Request)) in compiled.php line 9828
  at Pipeline-&gt;then(object(Closure)) in compiled.php line 8122
  at Router-&gt;runRouteWithinStack(object(Route), object(Request)) in compiled.php line 8113
  at Router-&gt;dispatchToRoute(object(Request)) in compiled.php line 8103
  at Router-&gt;dispatch(object(Request)) in compiled.php line 2400
  at Kernel-&gt;Illuminate\Foundation\Http\{closure}(object(Request))
  at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52
  at Pipeline-&gt;Illuminate\Routing\{closure}(object(Request)) in compiled.php line 3237
  at CheckForMaintenanceMode-&gt;handle(object(Request), object(Closure))
  at call_user_func_array(array(object(CheckForMaintenanceMode), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9838
  at Pipeline-&gt;Illuminate\Pipeline\{closure}(object(Request))
  at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
  at Pipeline-&gt;Illuminate\Routing\{closure}(object(Request))
  at call_user_func(object(Closure), object(Request)) in compiled.php line 9828
  at Pipeline-&gt;then(object(Closure)) in compiled.php line 2347
  at Kernel-&gt;sendRequestThroughRouter(object(Request)) in compiled.php line 2331
  at Kernel-&gt;handle(object(Request)) in index.php line 54
  at require_once('C:\xampp\htdocs\Laravel_apps\App\public\index.php') in server.php line 21
  1/2
  PDOException in Connection.php line 333:
  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'app.articles' doesn't exist
  in Connection.php line 333
  at PDO-&gt;prepare('select * from `articles`') in Connection.php line 333
  at Connection-&gt;Illuminate\Database\{closure}(object(MySqlConnection), 'select * from `articles`', array()) in Connection.php line 666
  at Connection-&gt;runQueryCallback('select * from `articles`', array(), object(Closure)) in Connection.php line 629
  at Connection-&gt;run('select * from `articles`', array(), object(Closure)) in Connection.php line 342
  at Connection-&gt;select('select * from `articles`', array(), true) in Builder.php line 1508
  at Builder-&gt;runSelect() in Builder.php line 1494
  at Builder-&gt;get(array('*')) in Builder.php line 596
  at Builder-&gt;getModels(array('*')) in Builder.php line 303
  at Builder-&gt;get(array('*')) in compiled.php line 10366
  at Model::all() in routes.php line 20
  at RouteServiceProvider-&gt;{closure}()
  at call_user_func_array(object(Closure), array()) in compiled.php line 8415
  at Route-&gt;runCallable(object(Request)) in compiled.php line 8405
  at Route-&gt;run(object(Request)) in compiled.php line 8121
  at Router-&gt;Illuminate\Routing\{closure}(object(Request))
  at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52
  at Pipeline-&gt;Illuminate\Routing\{closure}(object(Request)) in compiled.php line 3176
  at VerifyCsrfToken-&gt;handle(object(Request), object(Closure))
  at call_user_func_array(array(object(VerifyCsrfToken), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9838
  at Pipeline-&gt;Illuminate\Pipeline\{closure}(object(Request))
  at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
  at Pipeline-&gt;Illuminate\Routing\{closure}(object(Request)) in compiled.php line 13274
  at ShareErrorsFromSession-&gt;handle(object(Request), object(Closure))
  at call_user_func_array(array(object(ShareErrorsFromSession), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9838
  at Pipeline-&gt;Illuminate\Pipeline\{closure}(object(Request))
  at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
  at Pipeline-&gt;Illuminate\Routing\{closure}(object(Request)) in compiled.php line 11822
  at StartSession-&gt;handle(object(Request), object(Closure))
  at call_user_func_array(array(object(StartSession), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9838
  at Pipeline-&gt;Illuminate\Pipeline\{closure}(object(Request))
  at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
  at Pipeline-&gt;Illuminate\Routing\{closure}(object(Request)) in compiled.php line 13009
  at AddQueuedCookiesToResponse-&gt;handle(object(Request), object(Closure))
  at call_user_func_array(array(object(AddQueuedCookiesToResponse), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9838
  at Pipeline-&gt;Illuminate\Pipeline\{closure}(object(Request))
  at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
  at Pipeline-&gt;Illuminate\Routing\{closure}(object(Request)) in compiled.php line 12946
  at EncryptCookies-&gt;handle(object(Request), object(Closure))
  at call_user_func_array(array(object(EncryptCookies), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9838
  at Pipeline-&gt;Illuminate\Pipeline\{closure}(object(Request))
  at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
  at Pipeline-&gt;Illuminate\Routing\{closure}(object(Request))
  at call_user_func(object(Closure), object(Request)) in compiled.php line 9828
  at Pipeline-&gt;then(object(Closure)) in compiled.php line 8122
  at Router-&gt;runRouteWithinStack(object(Route), object(Request)) in compiled.php line 8113
  at Router-&gt;dispatchToRoute(object(Request)) in compiled.php line 8103
  at Router-&gt;dispatch(object(Request)) in compiled.php line 2400
  at Kernel-&gt;Illuminate\Foundation\Http\{closure}(object(Request))
  at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52
  at Pipeline-&gt;Illuminate\Routing\{closure}(object(Request)) in compiled.php line 3237
  at CheckForMaintenanceMode-&gt;handle(object(Request), object(Closure))
  at call_user_func_array(array(object(CheckForMaintenanceMode), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9838
  at Pipeline-&gt;Illuminate\Pipeline\{closure}(object(Request))
  at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
  at Pipeline-&gt;Illuminate\Routing\{closure}(object(Request))
  at call_user_func(object(Closure), object(Request)) in compiled.php line 9828
  at Pipeline-&gt;then(object(Closure)) in compiled.php line 2347
  at Kernel-&gt;sendRequestThroughRouter(object(Request)) in compiled.php line 2331
  at Kernel-&gt;handle(object(Request)) in index.php line 54
  at require_once('C:\xampp\htdocs\Laravel_apps\App\public\index.php') in server.php line 21
  </code></pre>