Skip to content

Latest commit

 

History

History
executable file
·
62 lines (50 loc) · 1.12 KB

README.md

File metadata and controls

executable file
·
62 lines (50 loc) · 1.12 KB

Laravel Functions

A simple way to add functions to your laravel project.

Installation

Option 1: Add directly to your composer.json

"require": {
    "sgtcoder/laravel-functions": "dev-develop"
}

"repositories": [
    {
        "type": "vcs",
        "url": "https://github.com/sgtcoder/laravel-functions"
    }
]

Option 2: Fork it and add to your composer.json

"require": {
    "sgtcoder/laravel-functions": "dev-master"
}

"repositories": [
    {
        "type": "vcs",
        "url": "https://github.com/<workspace>/laravel-functions"
    }
]

Then Run

composer update

Usage

Call Function

$hex = generate_random_hex();

Force SSL

# app\Http\Kernel.php => $middleware
\SgtCoder\LaravelFunctions\Middleware\HttpsProtocol::class,

API Auth

# app\Http\Kernel.php => $routeMiddleware
'auth.api' => \SgtCoder\LaravelFunctions\Middleware\AuthApi::class,

Credits

License

The MIT License (MIT). Please see License File for more information.