1. Go to this page and download the library: Download lionix/envclient library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
namespace App\Env;
use Lionix\EnvClient\Services\EnvValidator;
class BaseEnvValidationRules extends EnvValidator
{
public function rules(): array
{
return [
'APP_ENV' => ['
bash
$ php artisan env:diff
WARN Missing from the environment file:
⇂ NEW_FEATURE_FLAG
$ php artisan env:sync
INFO Added to the environment file:
⇂ NEW_FEATURE_FLAG
bash
$ php artisan env:set APP_ENV prod
ERROR The selected APP_ENV is invalid.
$ php artisan env:check
ERROR The selected APP_ENV is invalid.