1. Go to this page and download the library: Download glz/nvwa-core 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/ */
glz / nvwa-core example snippets
/**
* 本方法服务于URL:remoteUser/login
*/
public function login(Request $request){
$currentUser = $request->user();
if($currentUser){
$serverSide = new ServerSide();
return $serverSide->redirectToClientWithRemoteUserInfo($request);
}else{
return redirect("/auth/login?redirectTo=".urlencode($request->url()."?".$request->getQueryString()));
}
}