weixin_33721344 2016-07-04 12:39 采纳率: 0%
浏览 42

Laravel,Ajax,Jquery插件

I am designing a form in laravel to save a form which has fields like name, address and product name(it will be a GET method). So product name is to searched from database using jquery autocomplete plugin and ajax. My question is can we have POST and GET method on same view form in Laravel?

And if not then how can I achieve this, ie to save the name, address and filtered product name in db in one go onclick of submit button.

  • 写回答

1条回答 默认 最新

  • weixin_33709219 2016-07-04 12:51
    关注

    Try this one

    Route::any('foo', function () {
        return 'Hello World';
    });
    

    Or

    Route::match(['get', 'post'], '/', function () {
        return 'Hello World';
    });
    
    评论

报告相同问题?