javascript - Data insertion into database after clicking onto button -
i insert data database using laravel eloquent after pressing button.
my controller, controller method, route, js files ready.
i don't know how connect these together.
should fire event after clicking button, if yes how can using blade ?
i have main page , form this.
this main page :
{{ form::open(array('action'=>'mycontroller@mymethod')) }} <!--some html here !--> <div class="row form-group"> <div class="col-sm-4"> <div class="btn btn-success" id="add" onclick=""> here button </div> </div> </div> {{ form::close() }}
i need insert data after clicking button. how can ? said routes controller , function ready this.
thanks in advance.
since have form set up, have add submit button , go mycontroller@mymethod when submit button called on.
// submit button {{ form::submit('submit') }}
then in mymethod(), can call this
$data = input::all();
to form data.
Comments
Post a Comment