I am new for Laravel coding, Actually I want to data Insert, view, Update, Delete on same. Please give some project link or code.
use ajax call to achieve the the operations and the corresponding api should be present at back-end.. to achieve the same you can use RESTFul Controllers or define your own.
You want to learn RESTful controllers:
https://laravel.com/docs/5.2/controllers#restful-resource-controllers
Related
I'm developing a personal project using Laravel with Inertia.js. I tried retrieving data from back-end to front-end through HandleInertiaRequests Middleware. I was wondering how will malicious people could get advantage of the data I show up in front-end. Inertia.js webpage discourages retrieving sensible data in this way, but I can't figure out how that will be possible. I apologize if my answer sound a little naive, still pretty new to Laravel ad never used Inertia before. Thanks for your time!
The HandleInertiaRequests Middleware is nothing but a way to merge data into the array that will be available to your JavaScript components (Vue, React, Svelte) on the client side.
It is just a way to avoid repeating yourself on every controller for things that you'll probably need on a lot of pages. For example, instead of getting the data for a Menu component on every controller, you do this only in the HandleInertiaRequests Middleware.
So, they only warn you to be careful with what type of data you put into it. For example, you probably don't want to pass the user password through this in the same way you wouldn't do that using a Blade view instead of Inertia.
I want to use backpack to manupulate REST api data in my project.
I always used a backpack to administrate data using eloquent models without REST.
But now I want to request the data from api in controllers and show it in backpack crud tables.
I can request the data with guzzle, add multiple columns dynamically with $this->crud->addColumns();.
Could you tell me what method I should use inside my EntityCrudController setup() method to add the data like this? Thanks.
Using Laravel 5.8 with Backpack 3.5.
For REST using Slim framework 3.
I’m afraid it is not recommended to use Backpack with your custom REST API. Backpack depends on Eloquent to do everything related to database interaction, so you’d have to overwrite a lot of things.
While technically it is possible (you could create the operation methods in your EntityCrudController like store(), update(), destroy(), search() and call your API instead of Eloquent - it would be a lot of work. And it will probably be easier to just create CRUDs without Backpack.
I am new to symfony2 and this is my first question(please forgive me if something looks funny).
I've used some other 3rd party bundles before, but i need a way,which can implement pagination without refresh.
So, can anyone help me to solve this problem?
You can use Pagerfanta for pagination and use ajax call to update your view.
I am using mvc3 and I want to create an API with the site.
MVC makes it really easy to return json from the controller which I know how to do.
I want to use a subdomain for the api something like http://api.mydomain.com
I have a few questions
Do I create an area for api or just place the controller and model in the root?
How can I point to the subdomain so the url is api.mydomain.com not mydomain.com/api
What is the best way to version the api? do I just create a new controller for each version e.g. V1Controller,V2Contoller etc etc
Any suggestions would be really helpful.
Thanks for your help
I have recently used ServiceStack, I really like working with it, you should take a look
http://www.servicestack.net/
I was trying to implement the Ajax method for deploying dependent drop down select boxes inside Joomla. The Problem is that if you call an ajaxRequest to run a php with the query that populates the second drop down depending on the result of the first, this is out of the joomla framework and you can't use anything from the joomla functions.
So I need to copy into the new file all the details of my dbase login + to write down the html+php to populate the options. I was thinking whether there is an easier solution to this problem. Maybe the Joomla framework supports something like this.
Any ideas?
I think you create a view /ajax/
http://mysite.com/index.php?option=com_mycomponent&view=ajax&format=raw