Contents
A customer calls to say their account was modified without their permission. A team member swears they didn't delete that record. A third-party integration started behaving differently last Tuesday and nobody knows why. Without an audit trail, you're guessing. With one, you have answers in minutes.
Laravel Telescope is the first place to look when something goes wrong — and activity logging is the layer that tells you who did what and when.
What Telescope Is
Laravel Telescope is a debug assistant for your Laravel application. Install it, and it starts recording everything: every HTTP request, every database query, every queued job, every scheduled task, every exception, every log entry, every mail sent.
It doesn't replace your production monitoring stack. It's a searchable, per-request timeline of what your application actually did. The value becomes obvious the first time you need to debug something you can't reproduce locally.
Install it in minutes:
composer require laravel/telescope --dev
php artisan telescope:install
php artisan migrate
The --dev flag keeps it out of production by default. The dashboard lives at /telescope in your app.
Debugging with Telescope
Telescope's most useful view is Requests. Click any request and you see the full timeline: the route hit, every query executed, any jobs dispatched, any exceptions thrown, any mail queued. All in one place, in order.
That query that's running 47 times on a single page load? Telescope shows it. The N+1 problem you've been meaning to fix is suddenly impossible to ignore when you can see 47 identical queries in the same request view.
For background jobs, Telescope tracks each job run, the input it received, how long it took, whether it failed, and the full exception if it did. No log diving required.
Activity Logging: The Audit Trail Layer
Telescope is primarily for developers. Activity logging is for everyone else — your legal team, your ops team, and your customers.
An activity log answers: which user performed which action, on which record, at what time? This is different from an application debug log. It's a business record.
The most widely used package for this in Laravel is spatie/laravel-activitylog. It integrates cleanly with Eloquent:
use Spatie\Activitylog\Traits\LogsActivity;
use Spatie\Activitylog\LogOptions;
class Order extends Model
{
use LogsActivity;
public function getActivitylogOptions(): LogOptions
{
return LogOptions::defaults()
->logOnly(['status', 'assigned_to'])
->logOnlyDirty()
->setDescriptionForEvent(fn(string $event) => "Order was {$event}");
}
}
With logOnlyDirty(), only fields that actually changed get recorded. The activity_log table stores the causer (the user who made the change), the subject (the order), the event (updated), the old values, and the new values.
For manual logging — things that aren't Eloquent model changes — you use the activity() helper:
activity()
->causedBy($user)
->performedOn($invoice)
->withProperties(['reason' => $request->reason])
->log('Invoice voided manually');
That log entry shows up searchable and queryable alongside the automatic model logs.
Why This Matters Legally
Audit trails aren't just nice to have in regulated industries — they're required. HIPAA, SOC 2, and most financial compliance frameworks mandate that you can answer "who touched this record and when."
But even outside regulated industries, an audit log protects you. When a customer disputes a change to their account, you can show them the timestamp and the user who made it. When a team member is accused of unauthorized access, the log is evidence. When you need to undo a batch of changes made in error, the log tells you exactly what to reverse.
The cost of building this in is low. The cost of not having it when you need it is much higher.
Scoping Access to Telescope
In production, Telescope should only be accessible to your team. The install process sets up a gate in app/Providers/TelescopeServiceProvider.php:
protected function gate(): void
{
Gate::define('viewTelescope', function ($user) {
return in_array($user->email, config('telescope.allowed_emails'));
});
}
List the emails that should have access, or tie it to a role. Telescope in production is only useful if it's not accessible to the public.
The Combination Worth Building
Telescope for developer debugging. Activity logging for business audit trails. Together they give you a complete picture: what the application did, and who in your system directed it to do that.
Most teams add these reactively — after something goes wrong and they realize they have no record of what happened. The better move is to add them before that moment arrives.
If you're building an application where accountability matters, these layers should be part the initial build — not an afterthought. Let's talk about what that looks like for your project.
Telescope and activity logging are standard components of Pixelworx's maintenance and support engagements — the visibility layer that makes ongoing operations predictable.