Skip to content

Commit 6f38094

Browse files
committed
Update readme
1 parent 6ad748b commit 6f38094

File tree

1 file changed

+19
-17
lines changed

1 file changed

+19
-17
lines changed

README.md

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,41 @@
11
![Coffee for Laravel](https://github.com/GeneaLabs/laravel-caffeine/blob/master/caffeine.jpg)
22

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

78
## Implementation
8-
To achieve this, we are sending a caffeine-drip (a request at regular intervals) to keep the session from timing out.
9-
This is only implemented on pages with a `_token` field, so all other pages will time-out as normal.
9+
To achieve this, we are sending a caffeine-drip (a request at regular intervals)
10+
to keep the session from timing out.
11+
This is only implemented on pages with a `_token` field, so all other pages will
12+
time-out as normal.
1013

1114
## Reasoning
12-
I chose this approach to keep the integrity of site-security, by avoiding the following:
15+
I chose this approach to keep the integrity of site-security, by avoiding the
16+
following:
1317
- exposing the CSRF Token on an unsecured endpoint.
1418
- eliminating CSRF Token validation on specific routes, or even altogether.
1519
- removing session-timeout on all pages.
1620

1721
## Considerations
1822
### Routes
19-
This package adds the routes under `genealabs/laravel-caffeine`. Please verify that these don't collide with your
20-
existing routes.
23+
This package adds the routes under `genealabs/laravel-caffeine`. Please verify
24+
that these don't collide with your existing routes.
2125

2226
### Dependencies
23-
- Your project should be running Laravel 5.1 or higher.
27+
- Your project must be running Laravel 5.1 (LTS) or 5.3 (CURRENT).
28+
- PHP 7.0.0 or higher.
2429

2530
## Installation
26-
1. Install Caffeine via composer:
27-
28-
_(Future updates will only be made to the most current version.)_
29-
30-
For Laravel 5.1:
31+
1. Installation for Laravel LTS or CURRENT:
3132
```sh
32-
composer require genealabs/laravel-caffeine:~0.2.0
33+
composer require genealabs/laravel-caffeine
3334
```
3435

3536
For Laravel 5.2:
3637
```sh
37-
composer require genealabs/laravel-caffeine:~0.3.0
38+
composer require genealabs/laravel-caffeine:~0.3.11
3839
```
3940

4041
2. Add the service provider entry in `config\app.php`:
@@ -53,13 +54,14 @@ existing routes.
5354
## Configuration
5455
The following elements are configurable:
5556
- **domain:** (default: `url('/')`) Change to point to a different domain than
56-
your app. This is useful if you are behind a proxy or load-balancer.
57+
your app. This is useful if you are behind a proxy or load-balancer. ___Do not use
58+
the `url()` helper in the config file.___
5759
- **route:** (default: `genealabs/laravel-caffeine/drip`) Change to customize
5860
the drip URL in the browser. This is just cosmetic.
5961
- **dripIntervalInMilliSeconds:** (default: 5 mins) Change to configure the drip
6062
interval.
6163

62-
You only need to publish the config file it you want to customize it:
64+
___Only publish the config file it you need to customize it___:
6365
```sh
6466
php artisan vendor:publish --tag=genealabs-laravel-caffeine
6567
```

0 commit comments

Comments
 (0)