A simple way to add functions to your laravel project.
"require": {
"sgtcoder/laravel-functions": "dev-develop"
}
"repositories": [
{
"type": "vcs",
"url": "https://github.com/sgtcoder/laravel-functions"
}
]
"require": {
"sgtcoder/laravel-functions": "dev-master"
}
"repositories": [
{
"type": "vcs",
"url": "https://github.com/<workspace>/laravel-functions"
}
]
composer update
$hex = generate_random_hex();
# app\Http\Kernel.php => $middleware
\SgtCoder\LaravelFunctions\Middleware\HttpsProtocol::class,
# app\Http\Kernel.php => $routeMiddleware
'auth.api' => \SgtCoder\LaravelFunctions\Middleware\AuthApi::class,
The MIT License (MIT). Please see License File for more information.