Laravel

Fixing Voyager issue in Laravel 7

Have you tried running php artisan voyager:install but you keep getting an error that a VoyagerServiceProvider.php file is missing.

All your artisan commands are also throwing this error too.

Checking the vendor folder, I found that the tcg/voyager folder was empty and after hours of research I found a solution:

Step 1:

Go to https://github.com/the-control-group/voyager and clone this repo .

Step 2:

Unzip this repo and copy the content of the src folder into your vendor/tcg/voyager folder.

Step 3:

Run composer dump-autoload and php artisan cache:clear to be sure nothing is being cached.

Step 4:

Run your php artisan voyager:install command again.

Redis for Laravel

When running laravel you get errors if redis is allowed in the .env file.

  • sudo apt install php-dev php-pear
  • sudo pecl install redis
  • sudo nano /etc/php/8.0/mods-available/redis.ini
  • extension=redis.so
  • sudo systemctl restart apache2

PHP extensions install for Laravel

Use this command to install php extensions

sudo apt install php php-cli php-common php-json php-zip php-gd php-mbstring php-curl php-xml php-bcmath php-json php-pdo php-tokenizer php-xmlwriter php-ctype php-json php-bz2 php-zip php-dom