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

mbnoimi's avatar

Do I really need Inertia?

Hi,

I'm planning to create my first real project using Laravel + Vue + Inertia. The project has web ui & mobile app (ionic).

I love Vue + Inertia cocktail but does it make any sense to use it with Ionic?

As I know Ionic needs api endpoints which is not needed in case of using Vue + Inertia. What's your opinion and suggestions about this scenario?

0 likes
7 replies
OussamaMater's avatar

We use Interia because it takes out the pain of creating that API, and adds a lot of features actually which minimize your code and make you even more productive.

That does not mean you can't use it and create an API for your mobile application, because with Interia you won't really be worrying about your web application, it does not just take the API pain, it solves different things we hate, when deploying for instance, less testing, less issues and configuration, and guess what? even more secure, you will be using sessions instead of tokens, you won't have to worry about CORS and security concerns that come with SPA, and more things, lets say in the future you want to add websockets, I have seen a lot of people wanting to add it to their project lately, you will have to worry only about your mobile application as in Laravel itself it's a small tweaks really specially when everything lives in the same repo, and this is only an example.

So yes for me, if I have the chance to pair Laravel and Vue using Interia I will definitely go with it, and maintain API routes specifically for the mobile application, 0 regrets.

3 likes
tykus's avatar

You don't really need it, but there are a lot of benefits to it, for example, authentication, routing etc. are simplified compared with DIY Vue application. However, if you need to implement this logic for Ionic application as well, then those benefits might be moot.

If you did use Inertia, you would need separate API endpoints for the Ionic application. If you are clever about structuring the application (use of Actions, Eloquent API Resources) you can reuse a lot of the same logic to serve both Inertia and Ionic applications by keeping the Controller actions relatively simple..

2 likes
mbnoimi's avatar

@tykus

If you did use Inertia, you would need separate API endpoints for the Ionic application. If you are clever about structuring the application (use of Actions, Eloquent API Resources) you can reuse a lot of the same logic to serve both Inertia and Ionic applications by keeping the Controller actions relatively simple..

As I understood from you and from @oussamamater I can't get any benefit from Vue + Inertia with Ionic because in the end I've to create API endpoints for Ionic app which means I'll experience same old challenges without Inertia! If this is true.

What Inertia offered to me?! I've to rewrite all the endpoints as Inertia doesn't exist!

OussamaMater's avatar
Level 37

@mbnoimi As I said Interia will offer you additional benefits for the common tasks (have a look at the helpers it comes with in the docs), and you won't have to worry about maintaining the front and the back when deployed => less security issues, if you planning in automating the deployment or going for zero time deployment, writing a script for a SINGLE application is way easier than deploying the frontend and the backend each on its own (at some point you will be doing some devops).

And yes you'll need to define API routes for your mobile application.

2 likes
tykus's avatar

@mbnoimi probably Inertia offers you nothing if you're satisfied to take on the Vue application, handling routing, user sessions, response and error handling 🤷‍♂️ Like everything in life, there is a trade-off; where would you prefer to spend your efforts and intellect?

mbnoimi's avatar

Thank you guys for quick & productive replies

Please or to participate in this conversation.