Skip to content

salehhashemi1992/laravel-post-link

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel Post Link

Latest Version on Packagist Total Downloads Build Status

Post Link Component for Laravel

A simple package that provides a post-link component for Laravel. This component allows you to easily create links that, when clicked, will submit a form with a specified method (default is POST) and url. This is useful for creating links that delete or update resources, for example.

Installation

You can install the package via composer:

$ composer require salehhashemi1992/laravel-post-link

Usage

Once the package is installed, you can use the x-post-link component in your blade templates:

<x-post-link method="PUT" :url="route('notifications.mark-as-read', $notification->id)"
class="badge bg-danger rounded-pill float-end">
<i class="fe-x text-light"></i>
</x-post-link>

This will render a link that, when clicked, will submit a form with the method of "PUT" and the url of the mark-as-read action on the notifications controller with the notification id.

You can also pass a confirm attribute to the component, which will display a JavaScript confirm dialog before submitting the form.

Change log

Please see the changelog for more information on what has changed recently.

Contributing

Please see contributing.md for details and a todolist.

Security

If you discover any security related issues, please email salpars2004@gmail.com instead of using the issue tracker.

Credits

License

MIT. Please see the license file for more information.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published