26/10
2016
Wallogit.com
2017 © Pedro Peláez
form to make a api form for other device. this only for laravel project !
form to make a api form for other device. this only for laravel project !, (*1)
in composer.json add
json
"Wisdom\\Openform\\" : "vendor/wisdompackage/openform/src"
to "psr-4", (*2)
in config/app add
php
Wisdom\Openform\OpenformServiceProvider::class,
to array provider, (*3)
and then run
bash
$ composer require wisdompackage/openform, (*4)
run
bash
$ php artisan vendor:publish
$ php aritsan migrate, (*5)
so now you can run a form package thought, (*6)
www.yourdomain.com\form, (*7)
Send your answer by http POST, (*8)
type : json, (*9)
example, (*10)
{ "form_id" : 1 ,
"answers" : [
{"question_id" : 1,
"type" : "text",
"value" : "eiei"
},
{"question_id" : 2,
"type" : "single",
"value" : 2
},
{
"question_id" : 3,
"type" : "multiple",
"values" : [1,2,3]
}
]
}