Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Loki Laravel Package

laravelista/loki

Laravelista Loki is a Laravel logging driver that ships your application logs to Grafana Loki, the log aggregation system. Configure a Loki channel in config/logging.php and each log entry is pushed to Loki with labels, ready for querying and visualization in Grafana dashboards.

View on GitHub
Deep Wiki
Context7

Laravel localization done right.

Frequently asked questions about Loki
What is laravelista/loki used for in Laravel?
Laravelista Loki is a localization routing package for Laravel, not a message translation library. It lets you declare locale-prefixed route groups and resolve translated route segments from language files, so /en/about and /hr/o-nama can point to the same route. It sits in the presentation and routing layer with no persistence, queue, or network surface, so it is cheap to adopt and remove. Use it only when URL localization matters for SEO or brand reasons.
How do I install laravelista/loki?
Install it with Composer using composer require laravelista/loki and rely on Laravel 5.5+ service-provider auto-discovery; you may also need to publish configuration. Before committing, run a dry-run or composer why-not against your target application because the package's old constraints may block resolution. Then define your locales and language-file route segments and test every localized route.
Which Laravel and PHP versions does laravelista/loki support?
The last release was February 2020, so its illuminate/* and PHP constraints almost certainly cap it at Laravel 5.x or 6.x. It is unlikely to resolve on Laravel 9, 10, or 11 without forking. Confirm with composer require laravelista/loki --dry-run or composer why-not in your actual application, because dependency resolution is the first gate.
Does laravelista/loki work with route:cache?
Route caching is one of the main production surfaces to validate, not something to assume. The package resolves translated route segments through Laravel's router, so run php artisan route:cache in a throwaway branch and click through every localized route. Also test cache clearing and deployment flows, because small unmaintained routing packages can behave differently once routes are cached.
How does laravelista/loki detect the locale?
The package is built around locale-prefixed route groups, so the locale is expected to come from the URL structure rather than only from session or Accept-Language headers. The available context does not confirm session or header fallback behavior, so read the source and test missing or unsupported locales. Define what should happen when the URL prefix is absent and how your existing locale middleware interacts.
Can I use laravelista/loki just for translating messages?
No, that would be unnecessary indirection. Laravel's native __() helper plus app()->setLocale() already covers message translation. Loki's value is URL localization: locale-prefixed routes and translated route segments for SEO or brand reasons. If you only need translated strings, skip the package.
Is laravelista/loki maintained and safe for production?
Security risk is low because the package has no I/O, auth, or serialization of untrusted input. The bigger risks are version drift and abandonment: roughly 78 stars, effectively one maintainer, and no tagged release since February 2020. Treat it as a pattern to harvest or a small dependency to fork, not a long-term unowned dependency. Validate middleware ordering, fallback locale, and route caching before production.
What are the alternatives to laravelista/loki for localized Laravel routes?
The cheapest alternative is first-party code: a {locale} prefix route group in RouteServiceProvider plus Lang::get("routes.$key") for translated segments, roughly 50 to 100 lines with no external dependency. You can also vendor the package's small source into app/Support under its MIT notice if you want to preserve the exact API. For message translation only, use Laravel's native localization helpers.
How do I replace or migrate away from laravelista/loki?
If route localization is currently ad hoc, Loki's value is consolidation rather than new capability, so replacing it means moving that logic into your own route provider. Extract the {locale} prefix group and route-segment translation calls, then remove the dependency and keep tests around route generation and fallback locales. If the version constraint blocks adoption, do this from the start instead of forking.
What should I check before adopting laravelista/loki in an existing app?
Check three surfaces first: Composer resolution in your target app, compatibility with php artisan route:cache, and interaction with any existing SetLocale middleware. Also confirm the expected language-file layout for route segments and behavior when a segment key exists in one locale but not another. If adopted, pin the exact commit or fork in composer.json and record an ADR explaining the pin and exit plan.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core