Skip to content

Optimize command has error #63

@jalallinux

Description

@jalallinux
  • 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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions