title: VueJs page gives 404 on refresh
body: <p>I just uploaded my blog app to a test server. When I click on post from the homepage I am able to view the single page using the slug URL. However, from the single page, If I refresh the page it gives me a 404 page.</p>
  <p>I had used something like the below for my users component:</p>
  <pre><code>Route::get('/admin/users{vue_capture?}', function () {
      return view('admin');
  })-&gt;where('vue_capture','[\/\w\.-]*');
  </code></pre>
  <p>This is how my routes.js looks like:</p>
  <pre><code>import VueRouter from 'vue-router';
  import Admin from './components/Admin.vue';
  import Homepage from './components/Homepage.vue';
  import Subscriber from './components/subscriber/Main.vue';
  import Single from './components/Single.vue';
  import Categories from './components/Categories.vue';
  
  let routes = [
      {
          path: '/',
          component: Homepage
      },
      {
          path: '/subscriber',
          component: Subscriber
      },
      {
          path: '/post/:slug',
          name: 'post',    
          component: Single
      },
      {
          path: '/categories/:slug',
          component: Categories
      }
  ];
  
  export default new VueRouter({
      mode: 'history',
      routes
  });
  </code></pre>
  <p>And my Laravel routes are like this:</p>
  <pre><code>&lt;?php
  use App\User;
  use App\Http\Resources\User as UserResource;
  use App\Http\Resources\UserCollection;
  /*
  |--------------------------------------------------------------------------
  | Web Routes
  |--------------------------------------------------------------------------
  |
  | Here is where you can register web routes for your application. These
  | routes are loaded by the RouteServiceProvider within a group which
  | contains the &quot;web&quot; middleware group. Now create something great!
  |
  */
  Route::get('/', function () {
      return view('homepage');
  });
  
  Auth::routes();
  Route::get('/logout', 'Auth\LoginController@logout')-&gt;name('logout' );
  Route::get('/home', 'HomeController@index')-&gt;name('home');
  
  /************************************************************
                              API'S
  ************************************************************/
  Route::get('/api/homeposts', 'HomePostsController@posts')-&gt;name('homeposts');
  Route::resource('/api/users', 'AdminUsersController');
  Route::resource('/api/posts', 'AdminPostsController');
  Route::resource('/api/categories', 'AdminCategories');
  Route::get('/api/loggedUser', 'AdminUsersController@loggUser')-&gt;name('singleUser');
  Route::put('/api/updatedUser/{id}', 'AdminUsersController@updateUser')-&gt;name('singleUserUpdate');
  
  Route::resource('/api/subscriber', 'SubscriberController');
  /*Route::get('/admin/users{vue_capture?}', function () {
      return view('admin');
  })-&gt;where('vue_capture','[\/\w\.-]*');*/
  
  /************************************************************
                          ADMIN ROUTES
  ************************************************************/
  Route::group(['middleware'=&gt;'admin'], function(){
      Route::get('/admin/users', 'AdminUsersController@users')-&gt;name('allusers');
      Route::resource('/admin/posts', 'AdminPostsController');
  });
  
  /************************************************************
                      SUBSCRIBER ROUTE
  ************************************************************/
  Route::group(['middleware'=&gt;'subscriber'], function(){
      Route::get('/subscriber/{vue_capture?}', function () {
          return view('homepage');
      })-&gt;where('vue_capture','[\/\w\.-]*');
  });
  
  /**********************************************************/
  
  Route::get('/single/post/{slug}', 'AdminPostsController@single');
  </code></pre>
  <p>But how exactly can I handle for the single post page?</p>