Download the PHP package tinigin/laravel-last-modified without Composer
On this page you can find all versions of the php package tinigin/laravel-last-modified. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tinigin/laravel-last-modified
More information about tinigin/laravel-last-modified
Files in tinigin/laravel-last-modified
Package laravel-last-modified
Short Description Setting the Last-Modified header and 304 Not Modified response code if the page hasn't changed since the last visit
License MIT
Homepage https://github.com/tinigin/laravel-last-modified
Informations about the package laravel-last-modified
Last-Modified / 304 Not Modified Handler for Laravel
Easily setting the Last-Modified header and 304 Not Modified response code.
Requirements
- PHP 8.2+
- Laravel 11.x / 12.x / 13.x
Installation
You can install the package via composer:
Optionally, you can publish the config file with:
Usage
The setup is very simple and consists of two steps:
Registering middleware
Set Last Update Date in your Controller
It's all. Now you can check the headers.
How to check headers
You can check headers in the browser console under the Network tab (make sure Disable Cache is off)
Testing
or
or see https://github.com/tinigin/laravel-last-modified/actions/workflows/tests.yml
Feedback
If you have any feedback, comments or suggestions, please feel free to open an issue within this repository.
Contributing
Please see CONTRIBUTING for details.
Credits
License
The MIT License (MIT). Please see License File for more information.