A useful toolkit for a quick start with laravel or lumen... It can also help you in your rest api development with these last
You can install the package via composer:
composer require mawuekom/laravel-fastkit
This package use :
Check on it for good installation
Go to config/app.php, and add this in the providers key
'providers' =>
...
Mawuekom\Fastkit\FastkitServiceProvider::class
...
];
Publish package config
php artisan vendor:publish --provider="Mawuekom\Fastkit\FastkitServiceProvider"
Go to App\Http\Kernel.php
, and add this in the specified key
protected $routeMiddleware = [
...
'cors' => Fruitcake\Cors\HandleCors::class
'sanitized_request' => \Mawuekom\Fastkit\Http\Middleware\SanitizedRequest::class,
'api_localization' => \Mawuekom\Fastkit\Http\Middleware\ApiLocalization::class,
'check_id' => \Mawuekom\Fastkit\Http\Middleware\CheckResourceID::class
...
];
Go to bootstrap/app.php
, and add this in the specified key
$app->middleware([
...
Fruitcake\Cors\HandleCors::class,
...
]);
$app->routeMiddleware([
...
'cors' => Fruitcake\Cors\HandleCors::class
'sanitized_request' => \Mawuekom\Fastkit\Http\Middleware\SanitizedRequest::class,
'api_localization' => \Mawuekom\Fastkit\Http\Middleware\ApiLocalization::class,
'check_id' => \Mawuekom\Fastkit\Http\Middleware\CheckResourceID::class
...
]);
// Add provider also
$app->register(Mawuekom\Fastkit\FastkitServiceProvider::class);
Contact me on Twitter @ephraimseddor
The MIT License (MIT). Please see License File for more information.