Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An error on php artisan migrate #6

Open
mzch opened this issue May 17, 2020 · 5 comments
Open

An error on php artisan migrate #6

mzch opened this issue May 17, 2020 · 5 comments

Comments

@mzch
Copy link

mzch commented May 17, 2020

When I ran php artisan migrate, the following error occurred.

^_^[mzch@lt /srv/LaravelDrive][0]$ sudo -u www-data php artisan migrate
**************************************
*     Application In Production!     *
**************************************

 Do you really wish to run this command? (yes/no) [no]:
 > yes

Migration table created successfully.
PHP Fatal error:  Cannot declare class CreateLanguagesTable, because the name is already in use in /srv/LaravelDrive/vendor/joedixon/laravel-translation/database/migrations/2018_08_29_200844_create_languages_table.php on line 47

   Symfony\Component\ErrorHandler\Error\FatalError

  Cannot declare class CreateLanguagesTable, because the name is already in use

  at vendor/joedixon/laravel-translation/database/migrations/2018_08_29_200844_create_languages_table.php:47
    43|     {
    44|         Schema::connection(config('translation.database.connection'))
    45|             ->dropIfExists(config('translation.database.languages_table'));
    46|     }
  > 47| }
    48|


   Whoops\Exception\ErrorException

  Cannot declare class CreateLanguagesTable, because the name is already in use

  at vendor/joedixon/laravel-translation/database/migrations/2018_08_29_200844_create_languages_table.php:47
    43|     {
    44|         Schema::connection(config('translation.database.connection'))
    45|             ->dropIfExists(config('translation.database.languages_table'));
    46|     }
  > 47| }
    48|

      +1 vendor frames
  2   [internal]:0
      Whoops\Run::handleShutdown()

How can I fix this?

  • OS: Debian 10.4

  • PHP: 7.3.14

  • .env

APP_NAME="LetLive Drive"
APP_ENV=production
APP_KEY=base64:xxx=
APP_DEBUG=true
APP_URL=https://drive.letlive.com/

LOG_CHANNEL=stack

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laraveldrive
DB_USERNAME=laraveldrive
DB_PASSWORD=password

BROADCAST_DRIVER=log
CACHE_DRIVER=file
SESSION_DRIVER=file
SESSION_LIFETIME=120
QUEUE_DRIVER=sync

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_DRIVER=smtp
MAIL_HOST=mx1.mail-services.net
MAIL_PORT=587
MAIL_USERNAME[email protected]
MAIL_PASSWORD=password
MAIL_ENCRYPTION=tls

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1

MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

FACEBOOK_CLIENT_ID=null
FACEBOOK_CLIENT_SECRET=null
FACEBOOK_REDIRECT_URI=http://example.com/login/handle/facebook/

TWITTER_CLIENT_ID=null
TWITTER_CLIENT_SECRET=null
TWITTER_REDIRECT_URI=http://example.com/login/handle/twiter/

GOOGLE_CLIENT_ID=null
GOOGLE_CLIENT_SECRET=null
GOOGLE_REDIRECT_URI=http://example.com/login/handle/google/

GITHUB_CLIENT_ID=null
GITHUB_CLIENT_SECRET=null
GITHUB_REDIRECT_URI=http://example.com/login/handle/github/

YOUTUBE_CLIENT_ID=null
YOUTUBE_CLIENT_SECRET=null
YOUTUBE_REDIRECT_URI=http://example.com/login/handle/youtube/

TWITCH_CLIENT_ID=null
TWITCH_CLIENT_SECRET=null
TWITCH_REDIRECT_URI=http://example.com/login/handle/twitch/

INSTAGRAM_CLIENT_ID=null
INSTAGRAM_CLIENT_SECRET=null
INSTAGRAM_REDIRECT_URI=http://example.com/login/handle/instagram/
@LeonardoPastaDigital
Copy link

I have the same problem

@yiukamsum
Copy link

Have anyone solved the problem who can help me?

@pavel-kostyukov
Copy link

I was able to solve the problem.
You need to remove the dependency waavi/translation
This conflicts with joedixon/laravel-translation

@DevDorrejo
Copy link

I was able to solve the problem.
You need to remove the dependency waavi/translation
This conflicts with joedixon/laravel-translation

hello, how did you remove it?

@MusheAbdulHakim
Copy link

You can remove the waavi/translation package by running.
composer remove "waavi/translation" . Also make sure to remove the package serviceprovider in the config/app.php file.
Waavi\Translation\TranslationServiceProvider::class, .
You can comment that class out if you don't want to remove it. After that, you can now run migrations and all should be good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants