drehimself / laravel-ecommerce-example

Code for YouTube series on building a Laravel E-Commerce application.
https://www.youtube.com/watch?v=o5PWIuDTgxg&list=PLEhEHUEU3x5oPTli631ZX9cxl6cU_sDaR
1.01k stars 585 forks source link

please help me i get this problem #45

Open mkarnadi opened 5 years ago

mkarnadi commented 5 years ago

ini

techguydev commented 5 years ago

I'm having the same problem on a fresh installation, any thoughts @drehimself ?

techguydev commented 5 years ago

Hi, I've solved the problem, I'm sharing the solution:

1- First of all start a fresh installation, if in the past you have ran a migration delete all the database and create a new one. 2- The problem here has nothing to do with algolia, if you have checked again and again the credentials and you know that these are the corrects keep calm, the problem is not there. 3- Go to 2016_11_30_135954_create_permission_table.php and change :

$table->increments('id'); 

for            

$table->bigIncrements('id');

4- Go to 2016_10_21_190000_create_roles_table.php and change:

$table->increments('id'); 

for            

$table->bigIncrements('id');

5- Now you can run php artisan ecommerce:install

It shoulded work nicely.

The problem is being created because in the 5.8 version of Laravel the structure is moving 'increments' to 'bigincrements' and it is creating a problem when you are making foreign references.

I hope it does help.

mauphung commented 5 years ago

I changed $table→increments('id'); to $table→bigIncrements('id'); in 2016_11_30_135954_create_permission_table.php $table→increments('id'); to $table→bigIncrements('id'); in 2016_11_30_135954_create_permission_table.php I removed Laravel\Scout\Searchable from App\Product

But I STILL HAVE THE SAME PROBLEM after running php artisan ecommerce:install This will delete ALL your current data and install the default dummy data. Are you sure? (yes/no) [no]:

yes Images successfully copied to storage folder. Dropped all tables successfully. Migration table created successfully. Migrating: 2014_10_12_000000_create_users_table Algolia credentials incorrect. Your products table is NOT seeded correctly. If you are not using Algolia, remove Laravel\Scout\Searchable from App\Product

Where can I find a good package for a fresh installation?