Package intended for sending forms to the ProntoForms app directly from a Laravel project in a clean and simple way.
- Run
composer require omaromp2/laraprontoforms- Add the following line to your
.envfile:
# ProntoForms Params
PRONTO_USER=<your_auth_prontoforms_user_name>
PRONTO_PASS=<your_auth_prontoforms_user_pass>
PRONTO_FORM_ID=<your_form_id>
PRONTO_USER_ID=<your_user_id>
- Run
php artisan vendor:publishto publish the package's config file.
- Add the use case to your controller:
use omaromp2\laraprontoforms\ProntoForms;- Prepare an array with your form label as the key and the answer as the value:
$questions = [
'Label1' => 'Answer1',
'Label2' => 'Answer2',
]; - Send the form:
ProntoForms::sendForm($questions);- Check your response.
$formId = '<your_form_submission_id>';
ProntoForms::fetchForm($form_id);$formId = '<your_form_submission_id>';
ProntoForms::fetchPDF($form_id);