Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
1970Mr committed Aug 6, 2024
1 parent 2102ecf commit c2641bd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,20 +148,24 @@ php artisan redirect:list

### Controller and Views

Alternatively, you can set up a more customizable CRUD interface for redirects using controllers, requests, routes, and views. The package provides a command to scaffold these components:
You can also set up a more customizable CRUD interface for redirects using controllers, requests, routes, and views. The package provides a command to scaffold these components:

```bash
php artisan redirector:install
```

This command will install the necessary controllers, requests, routes, and views for managing redirects through a web interface.

### Custom Implementation

Additionally, you can use the Redirect model directly to create, update, or delete redirects within your application code as needed. This approach allows for complete customization of how and where redirects are managed.

## Caching

The package supports two caching methods:

- **Full List**: All active redirects are cached as a single collection. This method is efficient for a small number of redirects but may become inefficient as the number of redirects grows.
- **Single**: Each redirect is cached individually. This method scales better with a large number of redirects but may result in more cache operations.
- **Full List**: All active redirects are cached as a single collection. This method is efficient for a small number of redirects but may become inefficient as the number of redirects grows. Any create, update, or delete operation will reset the entire list cache.
- **Single**: Each redirect is cached individually. This method scales better with a large number of redirects but may result in more cache operations. Only the specific cached item is reset during create, update, or delete operations.

You can configure the caching method and TTL in the `config/redirector.php` file to suit your application's needs.
Expand All @@ -175,4 +179,4 @@ composer test
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "1970mr/laravel-redirector",
"description": "A Laravel package for managing URL redirects easily and efficiently.",
"keywords": [
"Mr1970",
"1970Mr",
"laravel-redirector",
"redirector",
Expand Down

0 comments on commit c2641bd

Please sign in to comment.