Download the PHP package darkperis/dpadn-laravel without Composer

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

Laravel ADNCache

This package allows you to use ADNcache together with Laravel.

It provides one facade:

Installation

Require this package using composer.

Laravel uses Auto-Discovery, so you won't have to make any changes to your application, the two middlewares and facade will be available right from the beginning.

Steps for Laravel >=5.1 and <=5.4

The package can be used for Laravel 5.1 to 5.4 as well, however due to lack of Auto-Discovery, a few additional steps have to be performed.

In config/app.php you have to add the following code in your aliases:

Copy adncache.php to config/:

Copy the package config/adncache.php file to your config/ directory.

important: Do not add the ServiceProvider under providers in config/app.php.

Steps for Laravel 5.5 and above

You should publish the package configuration, which allows you to set the defaults for the Cache-Control header:

Usage

The package comes with 2 functionalities: Setting the cache control headers for adncache and purging.

cache-control

You'll be able to configure defaults in the config/adncache.php file, here you can set the max-age (default_ttl), the cacheability (default_cacheability) such as public, private or no-cache or enable esi (esi) in the Cache-Control response header.

If the default_ttl is set to 0, then we won't return the Cache-Control response header.

You can control the config settings in your .env file as such:

You set the cache-control header for adncache using a middleware, so we can in our routes do something like this:

purge

If we have an admin interface that controls for example a blog, when you publish a new article, you might want to purge the frontpage of the blog so the article appears in the overview.

You'd do this in your controller by doing

You can also purge everything by doing:

One or multiple URIs can be purged by using a comma-separated list:

`

Laravel Authentication

If you use authentication in Laravel for handling guests and logged-in users, you'll likely want to also separate the cache for people based on this.

This can be done in the .htaccess file simply by using the cache-vary on the Authorization cookie:

Note: In the above example we use Authorization, this may have a different name depending on your setup, so it has to be changed accordingly.


All versions of dpadn-laravel with dependencies

PHP Build Version
Package Version
Requires illuminate/support Version ^5.1|^6|^7|^8|^9|^10.0|^11.0|^12.0
guzzlehttp/guzzle Version ^7.0.1
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 darkperis/dpadn-laravel contains the following files

Loading the files please wait ....