PHP code example of dongivan / laravel-route-versioning
1. Go to this page and download the library: Download dongivan/laravel-route-versioning 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/ */
dongivan / laravel-route-versioning example snippets
// api.php
use \Illuminate\Support\Facades\Route;
Route::version(1)->get("users", [App\Http\Controllers\UsersController::class, "index"])->name("v1:users.index");