Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

shamrat1's avatar

Is there anything in laravel natively that can give Ajax like functionality?

I was told by a guy that in laravel, we don't need Ajax or axios to get data from DB without refresh. Is there anything like that ? If yes, than what it's called ?

0 likes
6 replies
farshadf's avatar

@shamrat1 i am not sure if i got you right or no but laravel ships with vuejs and vue uses axios to make spa s and ajax requests so have you cheked that out ??

Tray2's avatar

You need Javascript for that as far as I know.

cmdobueno's avatar

Laravel is a PHP framework. Laravel does not provide anything that could do XHR (yes its real name...) requests. Laravel does loosely 'suggest' use of VueJs which uses axios to handle XHR.

It is quite magically... you should watch tutorials, as it is quite obvious you do not know what you are doing...

jlrdw's avatar

Is there anything in laravel natively that can give Ajax like functionality?

Of course there is, a round trip to the server, exactly the same.

The difference is you will get a whole page reload. With ajax you can just get the data and update the now static controls, (fields, inputs, etc).

But the functionality of getting the data is the same.

laravel natively

I don't understand, it's a php framework. It's not like react, vue, angular, etc.

I was told by a guy that in laravel, we don't need Ajax or axios to get data from DB without refresh.

Can you have the guy post here, how.

1 like
jlrdw's avatar

I'm just guessing that the guy is talking about Vuejs, he probably thinks it's part of Laravel. Which in a way Taylor has kind of made it part of laravel, but of course the user can choose to scaffold the front end as they choose.

I've just never heard of the other being a part of laravel, unless specifically installed.

Just my thoughts on it.

But of course vue Js and axios is a good match.

Please or to participate in this conversation.