1. Go to this page and download the library: Download abnermouke/pros 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/ */
abnermouke / pros example snippets
Abnermouke\Pros\ProsServiceProvider::class,
public function register()
{
if ($this->app->environment() !== 'production') {
$this->app->register(\Abnermouke\Pros\ProsServiceProvider::class);
}
// ...
}
use Illuminate\Support\Facades\Route;
use Illuminate\Support\Facades\Schema;
public function register()
{
//其他配置
//迁移配置
Schema::defaultStringLength(191);
//默认路由条件配置
Route::pattern('page', '[0-9]+');
Route::pattern('page_size', '[0-9]+');
Route::pattern('id', '[0-9]+');
Route::pattern('status', '[0-9]+');
Route::pattern('parent_id', '[0-9]+');
Route::pattern('order_sn', '[A-Z0-9]+');
}
public function map()
{
// 其他路由配置
$this->mapAbnermoukeProConsoleRoutes();
}
/**
* Define the "abnermouke/pros" console routes for the application.
*
* These routes are typically stateless.
*
* @return void
*/
protected function mapAbnermoukeProConsoleRoutes()
{
Route::middleware('abnermouke.pros.console')
->namespace('App\Interfaces\Pros\Console\Controllers')
->group(base_path('routes/abnermouke/pros/console.php'));
}
public function boot()
{
$this->configureRateLimiting();
$this->routes(function () {
// 其他路由服务注册
Route::middleware('abnermouke.pros.console')
->namespace('App\Interfaces\Pros\Console\Controllers')
->group(base_path('routes/abnermouke/pros/console.php'));
});
}