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

Optimize command has error #63

Open
jalallinux opened this issue Aug 20, 2024 · 1 comment
Open

Optimize command has error #63

jalallinux opened this issue Aug 20, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@jalallinux
Copy link

  • Laravel CRM Version: 9.19
  • PHP Version: 8.2

Description:

command php artisan optimize:clear work fine but php artisan optimize:clear has error

 INFO  Caching the framework bootstrap files.  

  config .................................................................................................................................. 9ms FAIL

   ErrorException 

  Cannot declare class App\User, because the name is already in use

  at vendor/venturedrake/laravel-crm/src/LaravelCrmServiceProvider.php:207
    203▕     {
    204▕         Paginator::useBootstrap();
    205▕ 
    206▕         if ((app()->version() >= 8 && class_exists('App\Models\User')) || (class_exists('App\Models\User') && ! class_exists('App\User'))) {
  ➜ 207▕             class_alias(config("auth.providers.users.model"), 'App\User');
    208▕             if (class_exists('App\Models\Team')) {
    209▕                 class_alias('App\Models\Team', 'App\Team');
    210▕             }
    211▕         }

      +8 vendor frames 
  9   [internal]:0
      Illuminate\Foundation\Application::Illuminate\Foundation\{closure}()

      +35 vendor frames 
  45  artisan:35
      Illuminate\Foundation\Console\Kernel::handle()

Steps To Reproduce:

  1. php artisan optimize:clear
  2. php artisan optimize
@andrewdrake
Copy link
Contributor

Thanks for reporting, I'm aware of this issue and will be fixing it in the next big version :)

@andrewdrake andrewdrake self-assigned this Dec 3, 2024
@andrewdrake andrewdrake added the bug Something isn't working label Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants