spatie / laravel-settings

Store strongly typed application settings

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

hsmfawaz opened this issue · comments

Hello Spatie team,
When creating a new setting migration with snake case like the following

php artisan make:settings-migration add_header_details_to_general_settings

It will throw an exception
Cannot declare class add_header_details_to_general_settings, because the name is already in use

Take a look at the database/settings directory of your application, there should already be a class with the same name add_header_details_to_general_settings. That's why you cannot add a second one. If you give it another name like add_header_details_to_general_settings_2 it should probably work.

@rubenvanassche

recieving same error tried clearing cache, composer dump-autoload

Attaching a screenshot

image

Could you check if you have another class named add tracking api key within your project?