sunchayn/nimbus
Nimbus is a Laravel package for generating and delivering notifications across multiple channels with clean, extensible drivers. It helps you define messages once, route them to email/SMS/webhooks, and manage templates, queues, and configuration in a consistent API.
Installation
composer require sunchayn/nimbus
php artisan nimbus:install
This publishes the config file (config/nimbus.php) and creates a migration for the schema cache table.
Basic Configuration
routes/api.php (or relevant route file) contains properly defined API routes with validation rules.php artisan migrate
First Use Case
/nimbus in your browser (or the configured route in nimbus.php).Schema Generation
Request classes, Validator rules, or inline Route::post()->validate()).FormRequest classes for complex validation:
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class StorePostRequest extends FormRequest {
public function rules() {
return ['title' => 'required|string', 'body' => 'required|string|max:1000'];
}
}
Testing API Endpoints
Accept: application/json, Authorization if middleware is configured).POST /api/posts).Integration with Laravel Features
auth:sanctum). Test authenticated routes by logging in via the UI.X-RateLimit-Remaining) in responses.Illuminate\Http\Resources\Json\JsonResource, Nimbus will display the structured response format.Customizing the UI
php artisan vendor:publish --tag=nimbus-views
FormRequest:
/**
* @property string $title - The post title (max 100 chars)
*/
Programmatic Access
Nimbus facade to generate schemas programmatically:
use Sunchayn\Nimbus\Facades\Nimbus;
$schema = Nimbus::schemaForRoute('api.posts.store');
Route Caching Conflicts
php artisan route:cache), Nimbus may not detect changes. Clear the cache after modifying routes:
php artisan route:clear
// nimbus:ignore
Route::post('/admin/secret', ...);
Validation Rule Mismatches
boot() or middleware). Ensure rules are defined in FormRequest or inline route validation.nimbus_schemas) for discrepancies. Clear the cache with:
php artisan nimbus:clear
Authentication Issues
auth:sanctum in your routes and log in via the UI.Performance with Large APIs
nimbus.php:
'exclude' => [
'admin/*',
'web/*',
],
'cache' => false,
Custom Validation Rules
rule:custom). Extend the schema builder by publishing the config and adding custom rule mappings:
'custom_rules' => [
'custom' => ['type' => 'string', 'description' => 'Custom validation logic'],
],
php artisan tinker
>>> \Sunchayn\Nimbus\Facades\Nimbus::schemaForRoute('api.posts.store')->toArray();
nimbus.php for verbose output:
'log_level' => \Illuminate\Log::DEBUG,
Custom UI Components
php artisan vendor:publish --tag=nimbus-assets
resources/js/nimbus/.Webhook Support
/nimbus/webhooks and use the schema UI to test.SchemaBuilder to include webhook-specific metadata.Dark Mode
'dark_mode' => env('NIMBUS_DARK_MODE', false),
Localization
php artisan vendor:publish --tag=nimbus-translations
resources/lang/vendor/nimbus/.How can I help you explore Laravel packages today?