Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9f0d41d827 | ||
|
|
562448f576 | ||
|
|
cb911a3c04 | ||
|
|
06ee9a5016 | ||
|
|
0113b0112b | ||
|
|
ae8d4bd432 | ||
|
|
c9fbf64472 | ||
|
|
d93b82b1eb | ||
|
|
02c55f765f |
@@ -2,6 +2,11 @@
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
## [1.1.0](https://github.com/Grazulex/laravel-api-kit/releases/tag/v1.1.0) (2025-12-25)
|
||||
|
||||
### Chores
|
||||
|
||||
- **deps:** update laravel-apiroute to ^1.0 ([02c55f7](https://github.com/Grazulex/laravel-api-kit/commit/02c55f765f103852258398d7d0d0790146a33f10))
|
||||
## [1.0.0](https://github.com/Grazulex/laravel-api-kit/releases/tag/v1.0.0) (2025-12-25)
|
||||
|
||||
### Features
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
"keywords": ["laravel", "api", "rest", "starter-kit", "sanctum"],
|
||||
"license": "MIT",
|
||||
"require": {
|
||||
"php": "^8.2",
|
||||
"php": "^8.3",
|
||||
"dedoc/scramble": "^0.12",
|
||||
"grazulex/laravel-apiroute": "^0.0",
|
||||
"grazulex/laravel-apiroute": "^1.2",
|
||||
"laravel/framework": "^12.0",
|
||||
"laravel/sanctum": "^4.0",
|
||||
"laravel/tinker": "^2.10.1",
|
||||
@@ -21,8 +21,8 @@
|
||||
"laravel/pint": "^1.24",
|
||||
"mockery/mockery": "^1.6",
|
||||
"nunomaduro/collision": "^8.6",
|
||||
"pestphp/pest": "^3.0",
|
||||
"pestphp/pest-plugin-laravel": "^3.0"
|
||||
"pestphp/pest": "^4.0",
|
||||
"pestphp/pest-plugin-laravel": "^4.0"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
||||
989
composer.lock
generated
989
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -17,13 +17,17 @@ use Illuminate\Support\Facades\Route;
|
||||
|
||||
// Version 1 - Current stable version
|
||||
ApiRoute::version('v1', function () {
|
||||
// Public routes
|
||||
Route::post('register', [AuthController::class, 'register'])->name('api.v1.register');
|
||||
Route::post('login', [AuthController::class, 'login'])->name('api.v1.login');
|
||||
// Public routes with auth rate limiter (5/min - brute force protection)
|
||||
Route::middleware('throttle:auth')->group(function () {
|
||||
Route::post('register', [AuthController::class, 'register'])->name('api.v1.register');
|
||||
Route::post('login', [AuthController::class, 'login'])->name('api.v1.login');
|
||||
});
|
||||
|
||||
// Protected routes
|
||||
Route::middleware('auth:sanctum')->group(function () {
|
||||
// Protected routes with authenticated rate limiter (120/min)
|
||||
Route::middleware(['auth:sanctum', 'throttle:authenticated'])->group(function () {
|
||||
Route::post('logout', [AuthController::class, 'logout'])->name('api.v1.logout');
|
||||
Route::get('me', [AuthController::class, 'me'])->name('api.v1.me');
|
||||
});
|
||||
})->current();
|
||||
})
|
||||
->current()
|
||||
->rateLimit(60); // Global rate limit: 60 requests/minute for v1
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
// Web routes disabled - API only application
|
||||
// Scramble documentation available at /docs/api
|
||||
|
||||
Reference in New Issue
Block a user