Git cloned laravel 5.2 project won't migrate
I clone a project from git.
After i run command:
- composer dump-autoload
- composer updated
File composer.json:
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.2.*",
"zizaco/entrust": "5.2.x-dev",
"doctrine/dbal": "^2.5",
"intervention/image": "^2.3"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~4.0",
"symfony/css-selector": "2.8.*|3.0.*",
"symfony/dom-crawler": "2.8.*|3.0.*"
},
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App": "app/"
}
},
"autoload-dev": {
"classmap": [
"tests/TestCase.php"
]
},
"scripts": {
"post-root-package-install": [
"php -r "copy('.env.example', '.env');""
],
"post-create-project-cmd": [
"php artisan key:generate"
],
"post-install-cmd": [
"IlluminateFoundationComposerScripts::postInstall",
"php artisan optimize"
],
"post-update-cmd": [
"IlluminateFoundationComposerScripts::postUpdate",
"php artisan optimize"
]
},
"config": {
"preferred-install": "dist"
}
}
File evn
APP_ENV=local
APP_DEBUG=true APP_KEY=SomeRandomString
APP_URL=http://localhost
DB_CONNECTION=mysql
DB_HOST=127.0.0.1 DB_PORT=3306
DB_DATABASE=wicker_master
DB_USERNAME=root
DB_PASSWORD=root
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
Error:
> IlluminateFoundationComposerScripts::postUpdate
> php artisan optimize
[IlluminateDatabaseQueryException]
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'wicker_master.about_us' doesn't exist (SQL: select * from `about_us`)
[PDOException]
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'wicker_master.about_us' doesn't exist
Script php artisan optimize handling the post-update-cmd event returned with error code 1
Do you have same db name created as in .env file ?
For example if you have written
DB_DATABASE=laravel
make sure you have create database named laravel
first