How does laravel encapsulate the data taken from the database into a model that jstree can read? It would be great if you could give an example...
<code>$("#tree_4").jstree({ core: { themes: { responsive: !1 }, check_callback: !0, data: { url: function (e) { return "{{ route('api.deparment') }}" }, data: function (e) { return { parent: e.id } } } }, types: { "default": { icon: "fa fa-folder icon-state-warning icon-lg" }, file: { icon: "fa fa-file icon-state-warning icon-lg" } }, state: { key: "demo3" }, plugins: ["dnd", "state", "types"] })</code>
How does laravel encapsulate the data taken from the database into a model that jstree can read? It would be great if you could give an example...
<code>$("#tree_4").jstree({ core: { themes: { responsive: !1 }, check_callback: !0, data: { url: function (e) { return "{{ route('api.deparment') }}" }, data: function (e) { return { parent: e.id } } } }, types: { "default": { icon: "fa fa-folder icon-state-warning icon-lg" }, file: { icon: "fa fa-file icon-state-warning icon-lg" } }, state: { key: "demo3" }, plugins: ["dnd", "state", "types"] })</code>
Laravel query results can be directly executed toJson()