https://github.com/codex-team/hawk.laravel
Hawk Laravel SDK
https://github.com/codex-team/hawk.laravel
Last synced: 5 months ago
JSON representation
Hawk Laravel SDK
- Host: GitHub
- URL: https://github.com/codex-team/hawk.laravel
- Owner: codex-team
- License: mit
- Created: 2025-02-01T13:33:05.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-01T16:18:23.000Z (over 1 year ago)
- Last Synced: 2025-07-08T12:03:22.288Z (12 months ago)
- Language: PHP
- Size: 14.6 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
**This project is currently in the testing phase and may undergo changes.**
# Hawk Laravel
Laravel errors Catcher for [Hawk.so](https://hawk.so).
## Setup
1. [Register](https://garage.hawk.so/sign-up) an account, create a Project and get an Integration Token.
2. Install SDK via [composer](https://getcomposer.org) to install the Catcher
- Catcher provides support for PHP 7.2 or later
- Your Laravel version needs to be 11.x or higher
### Install command
```bash
$ composer require codex-team/hawk.laravel
```
To enable capturing unhandled exceptions for reporting to `Hawk`, modify your `bootstrap/app.php` file as follows:
```php
withRouting(
web: __DIR__.'/../routes/web.php',
commands: __DIR__.'/../routes/console.php',
health: '/up',
)
->withMiddleware(function (Middleware $middleware) {
//
})
->withExceptions(function (Exceptions $exceptions) {
HawkBundle\Integration::handles($exceptions);
})->create();
```
### Register the Service Provider
To complete the setup, add the `Hawk` service provider to your `config/app.php` or `bootstrap/providers.php` file in the providers array:
```php
'providers' => [
// Other service providers...
HawkBundle\ErrorLoggerServiceProvider::class,
],
```
### Configuration
Set up Hawk using the following command:
```bash
$ php artisan hawkbundle:publish
```
This will create the configuration file (`config/hawk.php`), and you can manually add the `HAWK_TOKEN` in your `.env` file:
```env
HAWK_TOKEN=
```
## Issues and improvements
Feel free to ask questions or improve the project.
## Links
Repository: https://github.com/codex-team/hawk.laravel
Report a bug: https://github.com/codex-team/hawk.laravel/issues
Composer Package: https://packagist.org/packages/codex-team/hawk.laravel
CodeX Team: https://codex.so
## License
MIT