Install the required dependency
Install the required dependency as follows. These are required for Laravel Valet and any normal Laravel project.
brew install php brew install [email protected] brew install nginx brew install dnsmasq brew install caddy brew install redis brew install composer brew install meilisearch
Install Laravel Installer and Valet Globally
Get the Laravel Installer and Laravel Valet by installing it globally with composer
composer global require laravel/installer composer global require laravel/valet
Export PHP Vendor Bin
Export PHP vendor bin in .zshrc or .bashrc file.
export PATH=$PATH:~/.composer/vendor/bin
Switch PHP version
With Laravel Valet installed you can swith PHP version easily by using the following command.
valet use [email protected] valet use php
Install PHP Redis Extension
To install PHP extension you can make use of pecl. In this case you can install the PHP Redis extension as follows.
pecl search redis pecl install redis
Running Meilisearch
If you are using Meilisearch for Laravel you can start it running locally with the command like below.
meilisearch --master-key PNc4XN86dIslXd_nVdDg8nIG12-RsdpGQPxaIxWC1WE
Database
If you want to use MySQL or Postgresql then it's recommended to use DBNgin as it's easy GUI to add new DB, Update DB and Remove DB.
That's all for now, Cheers, hope it helps!
Leave a reply