Download the PHP package genealabs/laravel-caffeine without Composer

On this page you can find all versions of the php package genealabs/laravel-caffeine. 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 laravel-caffeine

Caffeine for Laravel

Travis Scrutinizer Coveralls GitHub (pre-)release Packagist

Caffeine for Laravel masthead image.

Supporting This Package

This is an MIT-licensed open source project with its ongoing development made possible by the support of the community. If you'd like to support this, and our other packages, please consider becoming a sponsor.

We thank the following sponsors for their generosity. Please take a moment to check them out:

Goal

Prevent forms from timing out when submitting them after leaving them on-screen for a considerable amount of time. (Laravel defaults to 120 minutes, but that is configurable and could be different site-by-site.)

Implementation

To achieve this, we are sending a caffeine-drip (a request at regular intervals) to keep the session from timing out. This is only implemented on pages with a _token field, so all other pages will time-out as normal.

Reasoning

I chose this approach to keep the integrity of site-security, by avoiding the following:

Considerations

Incompatible Packages

Routes

This package adds the routes under genealabs/laravel-caffeine.

Dependencies

Your project must fullfill the following:

Installation

Upgrade Notes

If you have previously registered the middleware, please remove the following middleware from app/Http/Kernel.php:

0.6.0

This update changes the config file setting names. Please delete the published config file config/genealabs-laravel-caffeine.php if it exists, and follow the configuration instructions below.

Configuration

Only publish the config file if you need to customize it:

Usage

That was it! It will apply itself automatically where it finds a form with a _token field, or a meta tag named "csrf-token", while pages are open in browsers.

Prevent Caffeination

There are two methods to prevent Caffeine for Laravel from dripping to keep the session alive: disabling it in Blade using the meta tag method, or enabling route-middleware mode, and then only enabling it on routes or route groups.

Meta Tag Method

If you would like to prevent a certain page from caffeinating your application, then add the following meta tag:

Route Middleware Method

To enable this mode, you need to publish the configuration file (see the configuration section above) and then set use-route-middleware to true. This will disable the default global middleware mode (which applies it to any page that has the CSRF token in it across your entire application). Now you need to selectively enable Caffeine on a given route or route group using route middleware:

You can still use the route middleware method and apply it globally to all routes by editing app/Http/Kernel.php and adding it to the web middleware group. Although you should only use this option if you have a very specific use- case that prevents you from utilizing the default global middleware option.

This will only have effect if the page includes a form. If not, the page will not caffeinate your application anyway.

The Fine Print

Commitment to Quality

During package development I try as best as possible to embrace good design and development practices to try to ensure that this package is as good as it can be. My checklist for package development includes:

Contributing

Please observe and respect all aspects of the included Code of Conduct https://github.com/GeneaLabs/laravel-caffeine/blob/master/CODE_OF_CONDUCT.md.

Reporting Issues

When reporting issues, please fill out the included template as completely as possible. Incomplete issues may be ignored or closed if there is not enough information included to be actionable.

Submitting Pull Requests

Please review the Contribution Guidelines https://github.com/GeneaLabs/laravel-caffeine/blob/master/CONTRIBUTING.md. Only PRs that meet all criterium will be accepted.

❤️ Open-Source Software - Give ⭐️

We have included the awesome symfony/thanks composer package as a dev dependency. Let your OS package maintainers know you appreciate them by starring the packages you use. Simply run composer thanks after installing this package. (And not to worry, since it's a dev-dependency it won't be installed in your live environment.)


All versions of laravel-caffeine with dependencies

PHP Build Version
Package Version
Requires illuminate/routing Version ^10.0|^11.0
illuminate/support Version ^10.0|^11.0
jenssegers/model Version ^1.5
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 genealabs/laravel-caffeine contains the following files

Loading the files please wait ....