Search code examples
laravellaravel-livewire

Error trying to publish config file of laravel-livewire?


Reading laravel-livewire docs at https://laravel-livewire.com/docs/2.x/installation

I tried to publish The Config File and I got unexpected results

$ php artisan livewire:publish

                                              
  Command "livewire:publish" is not defined.  
                                              
  Did you mean one of these?                  
      livewire:configure-s3-upload-cleanup    
      livewire:copy                           
      livewire:delete                         
      livewire:discover                       
      livewire:make                           
      livewire:move                           
      livewire:stubs                          
      stub:publish                            
      sweetalert:publish                      
      vendor:publish                          

                                          

Why so and which command have I use to to publish config file ?

I have :

"laravel/framework": "^7.0",
"livewire/livewire": "^1.3",

Thanks!


Solution

  • You have installed

    "livewire/livewire": "^1.3",
    

    and are referring to version 2 documentation https://laravel-livewire.com/docs/2.x/installation

    Use liverwire version 2 or version 1 documentation instead.

    In case others wonder, the line "livewire/livewire": "^1.3" can be found in require section of the composer.json file in the project's root directory.