Support the ongoing development of Laravel.io →
Configuration
Last updated 2 years ago.
0

Having worked on this all day.. I have come to the conclusion that there is a BUG or something inside the laravel 5 implementation...

When I create a new project... I run php artisan migrate:install.. it works.. if i re-run it I now get table exists..

I then add the environment.php file in bootstrap folder and then rename .env.example to .env and set my database option.. I then add a local/database.php file..

I run php artisan migrate:install.. i now get different errors.. saying table name which incidentally is ' ' ' is incorrect blah blah..

I am pasting it in pastebin: http://laravel.io/bin/BL9Yd

If however I use SQLite inside the folder.. it works so if i do:

<?php

return [
	
	'default' => 'sqlite',

	'connections' => [

		'sqlite' => [
			'driver'   => 'sqlite',
			'database' => ':memory:',
			'prefix'   => '',
		],

		// 'mysql' => [
		// 	'driver'    => 'mysql',
		// 	'host'      => env('DB_HOST') ?: 'localhost:8889',
		// 	'database'  => env('DB_DATABASE') ?: 'test',
		// 	'username'  => env('DB_USERNAME') ?: 'root',
		// 	'password'  => env('DB_PASSWORD') ?: 'root',
		// 	'charset'   => 'utf8',
		// 	'collation' => 'utf8_unicode_ci',
		// 	'prefix'    => '',
		// 	'port'		=> 8889,
		// 	'socket'	=> '/Applications/MAMP/tmp/mysql/mysql.sock',
		// 	'strict'    => false,
		// ],
	],
];
0

Using your solution above, most artisan commands work for me until I attempt to seed the database; then: "Database does not exist" Judging from your old settings, it looks like you were using MAMP as well (as I). Did you figure anything more out about this? The sqlite settings you use above just don't seem to create tables in the Mysql database MAMP uses. Thanks for any updates!

0

L5 has really gone away from the files in environment folders. When I played with it last, it wasn't merging the files any more, but rather overwriting them. So... I've fully switched over to the env way of doing things.

Basically everything is read from the environment. (.env) file. L5 out of the box has an example of this is in the database.php file.

Last updated 9 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

shez1983 shez1983 Joined 31 Dec 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.