PHP code example of plugins-world / market-manager

1. Go to this page and download the library: Download plugins-world/market-manager 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/ */

    

plugins-world / market-manager example snippets


\Plugins\MarketManager\MarketManager::auth(function ($request, $next) {
    // return \Illuminate\Support\Facades\Auth::onceBasic() ?: $next($request);
});


\Plugins\MarketManager\MarketManager::pluginAuth(function ($request, $next) {
    // return \Illuminate\Support\Facades\Auth::onceBasic() ?: $next($request);
});

# 配置首页默认路由,并进行 basic 认证(需要在数据库创建 users 信息,通过 email, password 登录)
Route::domain(parse_url(config('app.url'), PHP_URL_HOST))->get('/', function () {
    return redirect('/market-manager');
    return view('welcome');
})->middleware('auth.basic');