PHP code example of jobilla / deprecated-routes-middleware
1. Go to this page and download the library: Download jobilla/deprecated-routes-middleware 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/ */
jobilla / deprecated-routes-middleware example snippets
'deprecated' => \Jobilla\DeprecatedRoutes\Http\Middlewares\DeprecatedRoute::class,
Route::prefix('api/v3')
->middleware('deprecated:2021-03-22')
->group(function () {
// Your route definitions here.
});
Route::get('old/endpoint', OldEnpointController::class)->middleware('deprecated:2021-03-22');
class OldEnpointController extends Controller
{
public function __construct()
{
$this->middleware('deprecated:2021-03-22');
}
}