Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #4 from shinsenter/develop
Browse files Browse the repository at this point in the history
Updated package info
  • Loading branch information
shinsenter authored Apr 15, 2021
2 parents 5d87f36 + 9004277 commit a693826
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 24 deletions.
56 changes: 39 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# shinsenter/defer-laravel

🚀 A Laravel package that focuses on minimizing payload size of HTML document and optimizing processing on the browser when rendering the web page.
🚀 A Laravel package that focuses on minimizing payload size of HTML document
and optimizing processing on the browser when rendering the web page.

- **Package**: [shinsenter/defer-laravel](https://packagist.org/packages/shinsenter/defer-laravel)
- **Version**: 1.0.0
- **Version**: 1.0.3
- **Author**: Mai Nhut Tan <shin@shin.company>
- **Copyright**: 2021 AppSeeds <https://code.shin.company/>
- **License**: [MIT](https://raw.githubusercontent.com/shinsenter/defer-laravel/master/LICENSE)

[![Latest Version on Packagist](https://img.shields.io/packagist/v/shinsenter/defer-laravel.svg?style=flat-square)](https://packagist.org/packages/shinsenter/defer-laravel)
[![Latest Version on Packagist](https://img.shields.io/packagist/v/shinsenter/defer-laravel.svg)](https://packagist.org/packages/shinsenter/defer-laravel)
[![CodeFactor](https://www.codefactor.io/repository/github/shinsenter/defer-laravel/badge)](https://www.codefactor.io/repository/github/shinsenter/defer-laravel)
[![Total Downloads](https://img.shields.io/packagist/dt/shinsenter/defer-laravel.svg?style=flat-square)](https://packagist.org/packages/shinsenter/defer-laravel)
[![Total Downloads](https://img.shields.io/packagist/dt/shinsenter/defer-laravel.svg)](https://packagist.org/packages/shinsenter/defer-laravel)


## Features
Expand Down Expand Up @@ -41,15 +42,19 @@

## Installation

Require the `shinsenter/defer-laravel` package in your `composer.json` and update your dependencies:
Require the `shinsenter/defer-laravel` package
in your `composer.json` and update your dependencies:

```sh
composer require "shinsenter/defer-laravel"
```


## Global usage

To allow `DeferMiddleware` for all of your routes, add the `DeferMiddleware` middleware at the top of the `$middleware` property of `app/Http/Kernel.php` class:
To allow `DeferMiddleware` for all of your routes,
add the `DeferMiddleware` middleware at the top
of the `$middleware` property of `app/Http/Kernel.php` class:

```php
protected $middleware = [
Expand All @@ -61,26 +66,31 @@ protected $middleware = [

## Configuration

The defaults are set in `config/defer-laravel.php`. Publish the config to copy the file to your own config:
The defaults are set in `config/defer-laravel.php`.
Publish the config to copy the file to your own config:

```sh
php artisan vendor:publish --tag="defer-laravel"
```


### Options

View the [defer-laravel.php](https://github.com/shinsenter/defer-laravel/blob/master/config/defer-laravel.php) config file for more details.
View the [defer-laravel.php](https://github.com/shinsenter/defer-laravel/blob/master/config/defer-laravel.php)
config file for more details.


### Lumen

On Lumen, just register the `DeferServiceProvider` manually in your `bootstrap/app.php` file:
On Lumen, just register the `DeferServiceProvider` manually
in your `bootstrap/app.php` file:

```php
$app->register(\AppSeeds\DeferLaravel\DeferServiceProvider::class);
```

Also copy the [defer-laravel.php](https://github.com/shinsenter/defer-laravel/blob/master/config/defer-laravel.php) config file to `config/defer-laravel.php` and put it into action:
Also copy the [defer-laravel.php](https://github.com/shinsenter/defer-laravel/blob/master/config/defer-laravel.php)
config file to `config/defer-laravel.php` and put it into action:

```php
$app->configure('defer-laravel');
Expand All @@ -89,7 +99,8 @@ $app->configure('defer-laravel');

## Global usage for Lumen

To allow `DeferMiddleware` for all your routes, add the `DeferMiddleware` middleware to the global middleware.
To allow `DeferMiddleware` for all your routes,
add the `DeferMiddleware` middleware to the global middleware.

```php
$app->middleware([
Expand All @@ -101,7 +112,8 @@ $app->middleware([

### Changelog

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.
Please see [CHANGELOG](CHANGELOG.md)
for more information what has changed recently.


## Contributing
Expand All @@ -111,12 +123,15 @@ Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

If you discover any security related issues, please email shin@shin.company instead of using the issue tracker.
If you discover any security related issues,
please email [shin@shin.company](mailto:shin@shin.company)
instead of using the issue tracker.


## 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.


## My works
Expand All @@ -126,21 +141,28 @@ The MIT License (MIT). Please see [License File](LICENSE.md) for more informatio

https://github.com/shinsenter/defer.js/

🥇 A super small, super efficient library that helps you lazy load almost everything like images, video, audio, iframes as well as stylesheets, and JavaScript.
🥇 A super small, super efficient library
that helps you lazy load almost everything
like images, video, audio, iframes
as well as stylesheets, and JavaScript.


### defer.php

https://github.com/shinsenter/defer.php/

🚀 A PHP library that aims to help you concentrate on web performance optimization.
🚀 A PHP library that aims to help you
concentrate on web performance optimization.


### Wordpress plugin

https://github.com/shinsenter/defer-wordpress/

⚡️ A native, blazing fast lazy loader. ✅ Legacy browsers support (IE9+). 💯 SEO friendly. 🧩 Lazy load almost anything.
⚡️ A native, blazing fast lazy loader.
✅ Legacy browsers support (IE9+).
💯 SEO friendly.
🧩 Lazy load almost anything.


## Support my activities
Expand Down
14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@
}
],
"require": {
"php": "^5.6|^7|^8",
"illuminate/support": "^5|^6|^7|^8|^9",
"illuminate/contracts": "^5|^6|^7|^8|^9",
"symfony/http-foundation": "^2|^3|^4|^5",
"symfony/http-kernel": "^2|^3|^4|^5",
"shinsenter/defer.php": "^2.2"
"php": ">=5.6",
"illuminate/support": ">=5",
"illuminate/contracts": ">=5",
"symfony/http-foundation": ">=2",
"symfony/http-kernel": ">=2",
"shinsenter/defer.php": "^2.3"
},
"require-dev": {
"laravel/framework": "^5|^6|^7|^8"
"laravel/framework": ">=5"
},
"suggest": {
"ext-mbstring": "*"
Expand Down

0 comments on commit a693826

Please sign in to comment.