vitalets / x-editable

In-place editing with Twitter Bootstrap, jQuery UI or pure jQuery
http://vitalets.github.io/x-editable
MIT License
6.51k stars 1.72k forks source link

upgrade Laravel Example #1007

Closed mustafaamin closed 7 years ago

mustafaamin commented 7 years ago

I see that plugin using Ajax and POST , but laravel example using GET, If we change laravel example to using POST not GET ,I think it better, and here my solution to do that First befor using plugin using that code in view blade

$.ajaxSetup({
            headers: {'X-CSRF-Token': '{!! csrf_token() !!}'}
        });

and now the Controller

 public function xEditable(Request $request)
    {
        $id = $request->pk;
        $serie = Serie::findOrFail($id);
        $name = $request->name;
        $value = $request->value;
        return $serie->save();
    }
MarQuisKnox commented 7 years ago

Thanks for your effort.

However, there are several conflicting files in this PR. Can you please pull the develop branch & make your changes against it? Right now there are so many differences in the PR that I can not cleanly merge it.

Thanks.