title: LARAVEL query error 'SELECT count() as aggregate from posts where posts . deleted_at is null'
body: <p>So this is my first time trying to deploy my first laravel project to a shared hosting.</p>
  
  <p>What I do is basically make a folder in my shared hosting root folder and copy everything in my laravel project except the public folder.</p>
  
  <p>After it completed, I copied all of the public folder file and copied it to <code>public_html</code> in my shared hosting.</p>
  
  <p>Then I edited the index.php on public_html file to point to the right directory and edited the .env file for database configuration. I also already imported my database from my local machine.</p>
  
  <p>After that I tried to open my website and it shows me this error</p>
  
  <blockquote>
    <p>Illuminate\Database\QueryException SQLSTATE[28000] [1045] Access denied for user 'darrowxy_root'@'localhost' (using password: YES) (SQL: select count(*) as aggregate from <code>posts</code> where <code>posts</code>.<code>deleted_at</code> is null)</p>
  </blockquote>
  
  <p>I tried to open my login pages and it worked perfectly, but when I tried to login it also give me similar error</p>
  
  <blockquote>
    <p>Illuminate\Database\QueryException SQLSTATE[28000] [1045] Access
    denied for user 'darrowxy_root'@'localhost' (using password: YES)
    (SQL: select * from <code>users</code> where <code>email</code> = lionel.ritchie@yahoo.com
    limit 1)</p>
  </blockquote>
  
  <p>I've been searching for the solution over the internet but nothings worked.</p>
  
  <p>I only have one main controller that handle the CRUD, and the error told me that the errors are on my index function in the controller.</p>
  
  <pre><code>public function index()
  {
      $posts = Post::orderBy('created_at', 'desc')-&gt;paginate(8); //it points to this
  
      return view('posts.index')-&gt;with('posts', $posts);
  }
  </code></pre>
  
  <p>Any help appreciated, Thank you ^^</p>