thtg88 / laravel-pingable
Pingable provides a ping route for your Laravel application.
Installs: 33
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/thtg88/laravel-pingable
Requires
- php: ^8.0
- illuminate/config: ^8.62
- illuminate/http: ^8.62
- illuminate/routing: ^8.62
- illuminate/support: ^8.62
Requires (Dev)
- brainmaestro/composer-git-hooks: ^2.8
- friendsofphp/php-cs-fixer: ^3.1
- illuminate/testing: ^8.62
- orchestra/testbench: ^6.21
- phpstan/phpstan: ^0.12.99
- phpunit/phpunit: ^9.5
- vimeo/psalm: ^4.10
README
Pingable provides a ping route for your Laravel application.
Installation
composer require thtg88/laravel-pingable
Publish Configuration
If you want to change any of the default configuration variables, you can publish the config file with the following command:
php artisan vendor:publish --tag=pingable-config
Available configuration options
| Config Option | Type | Description | Default |
|---|---|---|---|
pingable.response |
mixed |
the response to be output by the controller. Please note this is output as JSON, so it must be something that is accepted by the Laravel Framework's response()->json(...) method |
['success' => true] |
pingable.route.method |
string |
the lowercased HTTP method the Pingable route responds to. This is anything supported by the Laravel Framework (get, post, etc.) |
get |
pingable.route.name |
string |
the name of the route, so that you can use it across the app, e.g. route(config('pingable.route.name')) |
pingable.api.ping |
pingable.route.path |
string |
the URI where the ping request will be reachable | pingable/api/ping |
pingable.controller |
string |
the fully-qualified classname of the controller that responds to the pingable.ping route. ⚠️ Once you override this, you are on your own! ⚠️ |
Thtg88\Pingable\Http\Controllers\PingController |
License
MIT