Skip to content

Instantly share code, notes, and snippets.

@filipfilipovich
Created May 26, 2023 11:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save filipfilipovich/4e75b41e68e6dd9dc3d6366c69db2f33 to your computer and use it in GitHub Desktop.
Save filipfilipovich/4e75b41e68e6dd9dc3d6366c69db2f33 to your computer and use it in GitHub Desktop.
API routes file (routes/api.php)
<?php
use App\Http\Controllers\GetBookByIsbnController;
use App\Http\Controllers\GetBooksController;
use Illuminate\Support\Facades\Route;
Route::get('/books', GetBooksController::class);
Route::get('/books/{isbn}', GetBookByIsbnController::class)->where('isbn', '[0-9]{10,13}');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment