artflow-studio / snippets
A Laravel package for performing basic operations.
Installs: 35
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Language:Blade
Requires
- php: ^8.0
- laravel/framework: *
README
A handy and easy-to-use collection of web snippets for PHP Laravel to boost your web development and save a lot of time. This package includes AJAX form saving and much more.
Installation
To install the package, use Composer:
composer require artflow-studio/snippets
Usage
Add the following line at the end of the tag in your Blade template:
@stack('scripts')
And boom, you are done!
Features
- Ajax Form Saving
@AF_AjaxForm([
'id' => 'id_of_the_form',
'route' => 'route.of.the.form',
'method' => 'post',
'logType' => 'swal',
'onSuccess' => [
'log' => 'swal', // options: 'swal', 'alert', 'console'
'reload' => true, // true or false
'dtable' => 'myDataTable' // ID of the DataTable to reinitialize
],
])
- Unique ID
generateUniqueID(model::class, 'column_name') // The Column where the unique id is to be saved