Download the PHP package dragon-code/last-modified without Composer

On this page you can find all versions of the php package dragon-code/last-modified. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package last-modified

Last Modified for Laravel

Laravel Last Modified

Stable Version Unstable Version Total Downloads Github Workflow Status

Setting the response code 304 Not Modified in the absence of content changes.

Installation

To get the latest version of Last Modified simply require the project using Composer:

Instead, you may of course manually update your require block and run composer update if you so choose:

And call php artisan vendor:publish --provider="DragonCode\LastModified\ServiceProvider" command.

Note

If you were using version 2.0 or less, run the php artisan migrate command. If this is your first time here, then you do not need to install this command, since, starting from version 2.1, we refused to store data in the database, replacing the storage with a cache.

Next, add middleware in $middlewareGroups > web section in app/Http/Kernel.php file:

IMPORTANT! It's recommended to add a middleware after CheckForMaintenanceMode::class.

The system works like this: when opening a page, the middleware checks if there is an entry in the database table about this link. If there is, it checks the Last-Modified header key and returns either 200 or 304 code.

To add records to the table, it is recommended to create a console command in your application using the following example:

Create / Update

IMPORTANT! The url attribute must be available for models.

If the model has no attribute url, it should be created.

For example:

Delete

Observer

In order to reduce the load on the database and free up the crown queue, it is recommended to use the observer to update the records:

Don't forget to add the link to the service provider:

License

This package is licensed under the MIT License.


All versions of last-modified with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
doctrine/dbal Version ^2.6 || ^3.0
dragon-code/laravel-cache Version ^3.3
dragon-code/simple-dto Version ^2.3
dragon-code/support Version ^6.0
fig/http-message-util Version ^1.1
illuminate/console Version >=6.0 <12.0
illuminate/database Version >=6.0 <12.0
illuminate/support Version >=6.0 <12.0
lmc/http-constants Version ^1.2
nesbot/carbon Version ^1.20 || ^2.0 || ^3.0
psr/http-message Version ^1.0.1 || ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package dragon-code/last-modified contains the following files

Loading the files please wait ....