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/ */
lionix / envclient example snippets
return [
/**
* Validation classes which contain environment rules
* applied by env artisan commands.
*
* Add your validation classes created by
* `php artisan make:envrule` command to apply their rules
*
* @var array
*/
'rules' => [
\App\Env\BaseEnvValidationRules::class
]
];
namespace App\Env;
use Lionix\EnvValidator;
class BaseEnvValidationRules extends EnvValidator
{
/**
* Validation rules that apply to the .env variables.
*
* @return array
*/
public function rules() : array
{
return [
//
];
}
}
...
public function rules() : array
{
return [
'DB_CONNECTION' => '
namespace App\Env;
use Lionix\EnvValidator;
class DatabaseEnvRules extends EnvValidator
{
/**
* Validation rules that apply to the .env variables.
*
* @return array
*/
public function rules() : array
{
return [
//
];
}
}