title: How to deploy Laravel 5 on a subdomain
body: <p>I have been using Laravel for quite a while but only recently have the need to deploy an app on a subdomain and I'm having some trouble. Everything works as it should if it's not deployed under a subdomain.</p>
  
  <p>So I have: domain.com (main site) and subdomain.domain.com (app)</p>
  
  <p>When I pull up the subdomain in the browser the index page loads fine(subdomain.domain.com), but when I try to access the login view(subdomain.domain.com/auth/login) - or any other view other than index - I get the following error:</p>
  
  <p>ErrorException in Connector.php line 47: 
  SQLSTATE[HY000] [2002] No such file or directory (View: /var/www/vhosts/domain.com/subdomain/resources/views/app.blade.php) (View: /var/www/vhosts/domain.com/subdomain/resources/views/app.blade.php)</p>
  
  <p>So, it appears Laravel is looking for resources in the wrong directory, but I don't know where to configure the app to look for them in the correct location.</p>
  
  <p>It's on a GoDaddy VPS. I have update config/app.php url to: <a href="http://subdomain.domain.com" rel="nofollow">http://subdomain.domain.com</a></p>
  
  <p>I setup the subdomain via Plesk and the root points to the public folder under the subdomain.</p>
  
  <p>I have tried wrapping my routes in Route::group(['domain' => 'subdomain.domain.com']....but that didn't help.</p>
  
  <p>Can anyone please point me in the right direction here? Thanks.</p>