I am doing deploy of an app made in laravel but I have problems when executing migrations, estpy using postgresql heroku as BD but in local use Xampp in my file database.php I have:
$host = env('DB_HOST', '127.0.0.1');
$database = env('DB_DATABASE', '');
$username = env('DB_USERNAME', 'forge');
$password = env('DB_PASSWORD', 'forge');
if($databaseUrl = getenv('DATABASE_URL')) {
$url = parse_url($databaseUrl);
$host = $url['host'];
$username = $url['user'];
$password = $url['pass'];
$database = substr($url['path'], 1);
}
'pgsql' => [
'driver' => 'pgsql',
'host' => $host,
'port' => env('DB_PORT', '5432'),
'database' => $database,
'username' => $username,
'password' => $password,
'charset' => 'utf8',
'prefix' => '',
'schema' => 'public',
'sslmode' => 'prefer',
],
Even though I follow the recommendations in the documentation, I'm getting this error:
The error suggests that it continues to take db_employees as bd (the one I use locally) but not the one that happens in database.php, but it does the migration only after it does not let me do insertions