2017 © Pedro PelĂĄez
 

library improved-links

Improved links that use HTML methods when clicked.

image

patroklo/improved-links

Improved links that use HTML methods when clicked.

  • Monday, December 18, 2017
  • by Patroklo
  • Repository
  • 5 Watchers
  • 6 Stars
  • 188 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 3 Versions
  • 4 % Grown

The README.md

Laravel improved HTTP method links

Links that send HTTP methods when clicked. Useful when needing POST or DELETE links., (*1)

Index

Install

Add this package with composer with the following command:, (*2)

composer require patroklo/improved-links

After updating composer, add the service providers to the providers array in config/app.php., (*3)

Patroklo\ImprovedLinks\Providers\ImprovedLinksProvider::class,

Go to your console and type the artisan vendor publish command., (*4)

php artisan vendor:publish

This will add the views and javascript needed for the correct operation of the package., (*5)

Finally, add in your layout a reference to the javascript library:, (*6)

    <script type="text/javascript" src="{{ asset('assets/js/improved-links.js') }}"></script>

Aaaaand it's done!, (*7)

Description

Handles the action triggered by user. This package lets the developer the creation of links that will use other HTTP methods than GET. Also it's possible to add manually data that will be sent through the link. It's possible to send any of the valid HTTP methods through this link: POST, GET, PUT, PATCH, DELETE., (*8)

How to use it

The link method it's an extension of the HTTP library based in the main link method., (*9)

\Html::methodLink'('method' => 'POST', 'url', 'title' => null, 'attributes' => [], 'secure' => null, 'escape' => true);

To send the data it's only neccesary to add a data key into the attributes section., (*10)

{{ Html::methodLink("PUT", 'site/foobar', 'Submit', ['data' => ['name1' => 'value1, 'name2' => 'value2']]) }}

Once clicked, the link will redirect to the defined url sending all the data via POST., (*11)

The Versions

18/12 2017

dev-master

9999999-dev

Improved links that use HTML methods when clicked.

  Sources   Download

MIT

The Requires

 

laravel delete link put post patch

18/12 2017

1.1.1

1.1.1.0

Improved links that use HTML methods when clicked.

  Sources   Download

MIT

The Requires

 

laravel delete link put post patch

09/03 2017

v1.0

1.0.0.0

Improved links that use HTML methods when clicked.

  Sources   Download

MIT

The Requires

 

laravel delete link put post patch