PHP code example of joycezhang / laravellib
1. Go to this page and download the library: Download joycezhang/laravellib 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/ */
joycezhang / laravellib example snippets
return [
'passport' => [//登录配置
'check_captcha_cache_key' => 'captcha_uniqid',//图形key
'password_salt' => env('LANDAO_PASSPORT_PASSWORD_SALT', env('APP_KEY'))//密码加密salt
],
'crypt' => [//数据库可逆加密
'screct_key' => env('LANDAO_CRYPT_SCRECT_KEY', env('APP_KEY'))
],
'captcha' => [//图形验证码
'charset' => 'abcdefghkmnprstuvwxyzABCDEFGHKMNPRSTUVWXYZ23456789',
'codelen' => 4,
'width' => 130,
'height' => 50,
// 为空为默认字体
'font' => '',
'fontsize' => 20,
'cachetime' => 300,
],
'paginate' => [//页数
'page_size' => 20
],
'generator' => [//Artisan 命令生成 Repository 和 enum 相关文件的指定根目录
'basePath' => app()->path(),
'rootNamespace' => 'App\\',
'paths' => [
'models' => 'Services\\Models',//model 生成根目录
'repositories' => 'Services\\Repositories',//repository 生成根目录
'interfaces' => 'Services\\Repositories',//repository interfaces 生成根目录。实际在生成中会转成 'App\Services\Repositories\Bolg\Interfaces\IPost.php
'enums' => 'Services\\Enums',
]
]
];
shell
php artisan vendor:publish --provider="JoyceZ\LaravelLib\ServiceProvider"
shell
php artisan make:repository "Blog\Post"
shell
php artisan make:enum "Blog\Post"