Download the PHP package elhebert/laravel-croustillon without Composer

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

Laravel Croustillon

A package to help you manage your cookie banner and cookie policy with ease.

Documentation is still a work in progress.

Why laravel-croustillon?

I'm glad you asked. During the develoment of this packages I used Cookie to namespace everything which quickly made it hard to dicerne the Laravel Cookie classes and the Cookie from my package.

I start thinking about names to use and thought of names like Donuts, Cake, Waffle or Biscuit. I discussed this with a colleague (@meduzen) and I joked about using Croustillon because it would make everything awesome.

Croustillon is a (french) Belgian word. For the non belgian people out here, Google Translate tells me it's called a donut in english, but I'm sceptical.

So here's a picture:

croustillon

Disclaimer

I'm not a lawyer, so everything here should be taken with a grain of salt, especially the legal documents.

Therefor I decline all responsability for any legal issues you might encounter by using this package without checking the legal documents with a lawyer.

Installation

This package uses auto-discovery, so you don't have to do anything.

You can publish the config-file with:

You can publish the language-file with:

You can publish the view-files with:

You can add a cookie banner to all responses of your app by registering Elhebert\Croustillon\Http\Middlewares\AddCookieBanner::class in the http kernel.

Alternatively you can apply the middleware on the route or route group level.

Usage

This package allows you to define a cookie policy. A cookie policy determines which cookies are used within your website and generate a corresponding banner and legal page.

By default every Laravel application has 2 cookies set, the laravel_session cookie and the XSRF-TOKEN cookie. Using a new Laravel application as example, here what you can expect:

Creating a cookie

As we all know website are not limited to use the default cookies and might use new ones for all kind of reasons. Which is why you can create custom cookies to add to a policy.

A cookie is compose of a name, a description, a duration, a purpose, a source and a category.

This package comes with pre-defined categories from which you can choose from:

Depending on which cookies you added to your policy, it'll impact the cookie banner and the legal page. The banner will add checkboxes for each categories of cookies (to offer fully granularity to the visitor) and the legal page will add the cookies and corresponding categories to the list of cookies.

If you need to customize the different variables you can use the corresponding functions instead of the variable:

Creatiing a policy

Once you have all your cookies, you need to create a new policy:

Don't forget to update the policy key of the config file to the class of your policy (in this case it would be App\Service\Croustillon\Policies\MyCustomPolicy).

Customising the cookie banner and the legal page

This package comes with a default cookie banner and legal page that you can (and should) customize, to do so you need to publish the package views:

Cookie banner

The banner will be in resources/views/vendor/croustillon/banner.blade.php. By default it's generating the checkboxes for every cookie categories present in your policy. The mandatory category will be checked and disable (because it's mandatory).

It also comes bundle with a controller and a route, so you don't need to worry about creating them in your application.

The default route is /croustillon.

Cookie legal page

The legal page can be found in resources/views/vendor/croustillon/policy.blade.php. The main content of that page is already done, but you still should update it to suit your need and your website.

The default route for this page is /croustillon/policy.

Customization

This package come with opinions. Like routes, copy and views.

Everything can be customize.

Routes

The prefix can be customize in the config file but should you need complete control on the routes you can disable the ones from this package to create your own.

The routes you need to create are:

Translations

You can overwrite the default translations by publishing the language files.

Views

You can overwrite the default views by publishing the view files.

Contributing

Please see CONTRIBUTING for more details.

License

This project and the Laravel framework are open-sourced software licensed under the MIT license.


All versions of laravel-croustillon with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1.3
illuminate/support Version 5.7.*
illuminate/http Version 5.7.*
illuminate/view Version 5.7.*
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 elhebert/laravel-croustillon contains the following files

Loading the files please wait ....