March 12, 2024 • For devs
Streply supports Laravel 11!
We're Streply, a tool that tracks errors and manages logs quickly. It's easy to set up and compatible with many popular frameworks. Made by developers, for developers! If you need to keep an eye on errors and follow logs in your app, create free account.
Today, a new Laravel framework version is out. It has many updates, mainly to the project structure. We'll talk in another article about what's new in Laravel 11, but Streply now supports it. See how to use Streply with a Laravel 11 project.
Installation
The first step is to download the streply/streply-laravel package using the composer.
composer require streply/streply-laravel
Then enable capturing exception in bootstrap/app.php:
<?php
use Illuminate\Foundation\Application;
use Illuminate\Foundation\Configuration\Exceptions;
use Illuminate\Foundation\Configuration\Middleware;
return Application::configure(basePath: dirname(__DIR__))
->withRouting(
web: __DIR__.'/../routes/web.php',
commands: __DIR__.'/../routes/console.php',
health: '/up',
)
->withMiddleware(function (Middleware $middleware) {
//
})
->withExceptions(function (Exceptions $exceptions) {
$exceptions->reportable(static function (Throwable $exception) {
\Streply\Exception($exception);
});
})->create();
The final step is to add the configuration to the .env file using the streply:publish command.
php artisan streply:publish https://clientPublicKey@api.streply.com/projectId
That's it! Now you can easily catch errors in your Laravel 11 project :)
- We are not pushy
- We only send a few emails every month. That's all.
- No spam
- We only send articles, and helpful tips for developers, not SPAM.