Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ahmeti/78d545f816227f2620ee0c3a61c132e5 to your computer and use it in GitHub Desktop.
Save ahmeti/78d545f816227f2620ee0c3a61c132e5 to your computer and use it in GitHub Desktop.
Laravel WAMP Mysql Connect Error

File: vendor\laravel\framework\src\Illuminate\Database\Connectors\MySqlConnector.php

Edit

return isset($port)
  ? "mysql:host={$host};port={$port};dbname={$database}"
  : "mysql:host={$host};dbname={$database}";

Change

return isset($port)
  ? "mysql:host={$host};port:{$port};dbname={$database}"
  : "mysql:host={$host};dbname={$database}";

File: vendor\laravel\framework\src\Illuminate\Database\Eloquent\Model.php

Edit

protected $primaryKey = 'id';

Change

protected $primaryKey = false;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment