Download the PHP package crudadmin/autoajax without Composer
On this page you can find all versions of the php package crudadmin/autoajax. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download crudadmin/autoajax
More information about crudadmin/autoajax
Files in crudadmin/autoajax
Package autoajax
Short Description Auto Ajax form submission for Laravel or plain PHP
License MIT
Informations about the package autoajax
AutoAjax PHP library
PHP library manages HTTP responses for javascript library autoAjax.js. Package is designed for cooperaton of Laravel/PHP with VueJs/PlainJS form submissions and automatic form validation management received from validated response.
This is part of package is for implementation on PHP/Laravel side of application. More for JavaScript/VueJs part of this package on autoAjax.js
Features
- automatically builds request data from form inputs.
- automatically bind validation error messages to each input from Laravel validation
- VueJs integration
- PlainJs integration
Composer installation
composer require "crudadmin/autoajax"
Usage
In Laravel controller response
If you need throw error message. You need use throw() or render() method.
API
JSON Response
callback - Javascript callback for autoAjax library
data - Array of additional data for autoAjax library and your responses in VueJs or PlainJs application
error - Is response error type?
message - Message output.
redirect - URL where should be user redirected after response request. AutoAjax.js will handle it.
title - Your custom title for modals message.
type - Message or modal. You can customize your response for alert messages or for modal windows.
Validation response
You can throw validation response with Laravel validator
You can also throw validation message by your own with throwValidation method
Or manualy send JSON request with error code 422 Unprocessable Entity