dept-eduk / api-force-app-update
Package info
bitbucket.org/e3creative/api-force-app-update
pkg:composer/dept-eduk/api-force-app-update
Requires
None
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is not auto-updated.
Last update: 2026-09-12 16:34:28 UTC
README
This package provides migrations and middleware for locking access to the API where the app version has been blacklisted.
Pulling in with composer:
- Install the package:
composer require e3creative/api-force-app-update
Customisation
The error message given by the middleware is customisable in config/api-force-app-update.php if you publish the
package's config file:
php artisan vendor:publish
How to Use
Add the middleware to the
$routeMiddlewareproperty of yourapp/Http/Kernel.php:/** * The application's route middleware. * * These middleware may be assigned to groups or used individually. * * @var array */ protected $routeMiddleware = [ ..., 'force_app_update' => \E3Creative\ApiForceAppUpdate\Middleware\ForceUpdate::class, ];Add the middleware to the routes you want to protect, or to the
apimiddleware group inKernel.phpif you want it to be applied univerally to theapiroutes.
Route::resource('users', 'UserController')->middleware('force_app_update');
- Run the new migrations with
php artisan migrate - Blacklist versions by adding them into your
blacklisted_versionstable