Skip to content

Instantly share code, notes, and snippets.

@owenconti
Last active December 20, 2020 04:57
Show Gist options
  • Save owenconti/6537495cc28698876a6a4e793e1d5a47 to your computer and use it in GitHub Desktop.
Save owenconti/6537495cc28698876a6a4e793e1d5a47 to your computer and use it in GitHub Desktop.
How to fix "cannot declare class because the name is already in use" error in Laravel/PHP
php artisan optimize:clear
composer dump-autoload
# Laravel Cashier includes this migration file:
vendor/laravel/cashier/database/migrations/2019_05_03_000001_create_customer_columns.php
# I opted to publish the migrations to my codebase
database/migrations/2019_05_03_000001_create_customer_columns.php
# I then renamed the migration file so I could change the order relative to my other migrations:
database/migrations/2020_10_01_000001_create_customer_columns.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment