gecche / laravel-multidomain

A Laravel extension for using a laravel application on a multi domain setting
MIT License
838 stars 105 forks source link

Artisan publish error Call to undefined function Laravel\Prompts\Concerns\mb_strimwidth() #112

Closed fpolli closed 5 months ago

fpolli commented 5 months ago

Hi, In the installation process for the package in Laravel 11, I put the requirement in composer.json, ran composer update, changed out the line in bootstrap/app.php, added the queueserviceprovider in bootstrap/providers.php and then:

$ php artisan vendor:publish
   Error 
  Call to undefined function Laravel\Prompts\Concerns\mb_strimwidth()
  at vendor/laravel/prompts/src/Concerns/Truncation.php:18
     14▕         if ($width <= 0) {
     15▕             throw new InvalidArgumentException("Width [{$width}] must be greater than zero.");
     16▕         }
     17▕ 
  ➜  18▕         return mb_strwidth($string) <= $width ? $string : (mb_strimwidth($string, 0, $width - 1).'…');
     19▕     }
     20▕ }
     21▕ 
      +1 vendor frames 
  2   [internal]:0
      Laravel\Prompts\Themes\Default\SearchPromptRenderer::Laravel\Prompts\Themes\Default\{closure}()
      +24 vendor frames 
  27  artisan:13
      Illuminate\Foundation\Application::handleCommand()

I am developing in VS Code in a docker container on MacOS.

gecche commented 5 months ago

Hi,

I don't get your error, so I'm not be able to help you. Anyway, I just recognized that the installation instructions were wrong, so I just updated the README file with right instructions.

Cheers

Giacomo