jeudi 5 mai 2016

Access denied for user 'homestead'@'localhost' (using password: YES) pdo exception

I got many solution for this problem but none are working.

This is my controller

   <?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

use App\Http\Requests;
use App\Doctor;

 class DoctorController extends Controller
 {
   public function index(){
     $doctors = Doctor::all();
     return $doctors;
     return "this is a doctorController";
   }

  }

and This is my model

    <?php

 namespace App;

 use Illuminate\Database\Eloquent\Model;

class Doctor extends Model
 {
 //
}

and this is my Route.php

 Route::resource("doctor","DoctorController");

This is my .env file

  APP_ENV=local
  APP_DEBUG=true
  APP_KEY=SomeRandomString
  APP_URL=http://localhost

 DB_CONNECTION=mysql
 DB_HOST=localhost
 DB_PORT=3306
 DB_DATABASE=medical
 DB_USERNAME=root
 DB_PASSWORD=

 CACHE_DRIVER=file
 SESSION_DRIVER=file
 QUEUE_DRIVER=sync

 REDIS_HOST=127.0.0.1
 REDIS_PASSWORD=null
 REDIS_PORT=6379

 MAIL_DRIVER=smtp
 MAIL_HOST=mailtrap.io
 MAIL_PORT=2525
 MAIL_USERNAME=null
 MAIL_PASSWORD=null
 MAIL_ENCRYPTION=null

I followed the solution of this http://ift.tt/1rZ7SnW and Laravel 5.2: PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'homestead'@'localhost' (using password: YES)

but none of them working .what should i do?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/23tIEtm
via IFTTT

Aucun commentaire:

Enregistrer un commentaire