-
-
Notifications
You must be signed in to change notification settings - Fork 4
Installation
This guide will help you install Laravel ApiRoute in your Laravel application.
Before installing, make sure your environment meets the following requirements:
| Requirement | Version |
|---|---|
| PHP | 8.3+ |
| Laravel | 12.x |
Install the package using Composer:
composer require grazulex/laravel-apiroutePublish the configuration file to customize the package behavior:
php artisan vendor:publish --tag="apiroute-config"This will create config/apiroute.php with all available options.
If you want to use the usage tracking feature, publish the migrations:
php artisan vendor:publish --tag="apiroute-migrations"Then run the migrations:
php artisan migrateThe package uses Laravel's auto-discovery, so the service provider is automatically registered.
If you have disabled auto-discovery, add the service provider manually to config/app.php:
'providers' => [
// ...
Grazulex\ApiRoute\ApiRouteServiceProvider::class,
],The ApiRoute facade is automatically registered. If needed, you can add it manually:
'aliases' => [
// ...
'ApiRoute' => Grazulex\ApiRoute\Facades\ApiRoute::class,
],Verify the installation by running:
php artisan api:statusYou should see:
No API versions registered.
This confirms the package is installed correctly.
- Getting Started - Create your first API version
- Configuration - Customize the package behavior
Laravel ApiRoute - Complete API versioning lifecycle management for Laravel
Home | Getting Started | Examples | Configuration
Made with ❤️ for the Laravel community