Skip to content

Commit 8e7014d

Browse files
Merge pull request #756 from iwasherefirst2/fix-make-cache-readme-more-clear
Fix make cache readme more clear
2 parents 4f0bfd8 + 0ec9e75 commit 8e7014d

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,18 @@ To cache your routes, use:
461461
php artisan route:trans:cache
462462
```
463463

464-
... instead of the normal `route:cache` command.
464+
... instead of the normal `route:cache` command. Using `artisan route:cache` will **not** work correctly!
465+
466+
For the route caching solution to work, it is required to make a minor adjustment to your application route provision.
467+
468+
In your App's `RouteServiceProvider`, use the `LoadsTranslatedCachedRoutes` trait:
469+
470+
```php
471+
<?php
472+
class RouteServiceProvider extends ServiceProvider
473+
{
474+
use \Mcamara\LaravelLocalization\Traits\LoadsTranslatedCachedRoutes;
475+
```
465476

466477

467478
For more details see [here](CACHING.md).

0 commit comments

Comments
 (0)