PHP code example of havenshen / larsign
1. Go to this page and download the library: Download havenshen/larsign 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/ */
havenshen / larsign example snippets
HavenShen\Larsign\LarsignServiceProvider::class,
'Larsign' => HavenShen\Larsign\LarsignFacade::class,
$app->register(HavenShen\Larsign\LarsignServiceProvider::class);
protected $middleware = [
// ...
\HavenShen\Larsign\HandleLarsign::class,
];
protected $middlewareGroups = [
'web' => [
// ...
],
'api' => [
// ...
\HavenShen\Larsign\HandleLarsign::class,
],
];
protected $routeMiddleware = [
// ...
'auth.larsign' => \HavenShen\Larsign\HandleLarsign::class,
];
return [
/*
|--------------------------------------------------------------------------
| Larsign
|--------------------------------------------------------------------------
|
*/
'headerName' => env('LARSIGN_HEADER_NAME', 'Larsign'),
'accessKey' => env('LARSIGN_ACCESS_KEY', ''),
'secretKey' => env('LARSIGN_SECRET_KEY', ''),
];
Route::middleware(['auth.larsign'])->group(function () {
Route::get('/larsign', function () {
return [
'message' => 'done.'
]);
});
Route::get('/larsign', function () {
return [
'message' => 'done.'
];
})->middleware('auth.larsign');