Include Vue in a Codeigniter project - codeigniter

I have a very broad project, developed in codeigniter, I want to integrate Vue and I do not know how to do it.
Is it better to create a new project based on Vue and try to migrate things?
Modify my JS of my current project and replace it with Vue?
What do you recommend?

i have sucessfully use vue to replace codeigniter view layer, i use laravel mixin to compile vue SFC then include built file to the codeigniter view template

FrontEnd frameworks has nothing to do backend frameworks. They communicate via http-request responses.
You may use backend of your choice and render the content on the page.
However, if you want to integrate vue with existing project (which is already working), I recommend new project based on Vue and migrate back end code on need basis

Related

Two different versions of Vue in Laravel?

I built my application using Vue3, now deploying it to Laravel.
However, I would like to make an administration panel for it, but I do not want to waste time creating a new template for it, but I want to use a ready-made template from the Internet. However, I have a problem because the all of available templates are based on the older version of VueJS 2.X.
What can I do? Can I somehow use two versions of VueJS with Laravel?
To create a Vue app, we need to use a special createApp function instead of ... will still install Vue 2.x and npm i vue#next will install Vue 3.

interact with different language pages in vuejs and laravel

I'm building a multi language website using Laravel and VueJS. I've build many vue components and laravel blade files in same html structure and those are different languages. I suppose to make different route file to each language.
But my problem is I cannot switch between different language. Please let me know how to do that?
If you're using blade and Vue as a library you can use https://github.com/mcamara/laravel-localization
If you're using Vue as SPA you can use https://github.com/kazupon/vue-i18n

Integrate Vue.js with laravel

I have built my static design using vue.js. Now, I need to integrate it within Laravel.
Once I do integrate Laravel with Vue then Laravel is not getting the Design files path. I mean the various Style and JS files.
FYI, I build the Vue in static design and it was working fine before integration with Laravel. But, while integrating with Laravel I am no longer using the build or build.js file. Instead of this, I am building using Laravel ways.
The main issue is the design is broken and the route is not working.

Connecting VueJS with laravel

Me and my co-worker both are freshers and I'm doing the front-end using VueJS and he is doing back-end using Laravel.
But How do we connect both back-end and front-end to deploy the final product?
We are struggling to put VueJS project files inside the laravel project files.
We don't have idea where to put main.js, where to put routers.js store.js App.vue inside the laravel
Install Vue Js inside Laravel Project using npm,Then in your resource/assets foleder you will see the app.js, vue component. Then compile it, laravel mix will place your app.js file inside public/js/app.js. Then include it in view file.
I asked this question when I start my career as a junior software engineer. Now I saw this again randomly. We had no idea how to connect back-end and the front-end. But eventually we learned we are developing a restAPI so we host back-end and front-end separately as two projects and connect them using the restAPI. Back-end and the front-end was two identical projects. =)

how to uses ReactJS and Laravel

how to combine Laravel and React? I mean, Laravel uses blade for its view, how to change it to React instead of blade ? There have been so many Laravel and Angular tutorial, but I can't find any for React and Laravel?
Any references of Laravel and ReactJS tutorial ?
If you are using Laravel to build a REST web service (API), then you might not need Blade. You just return JSON data. Your React App can then make calls to the Laravel API for data and process it right in the browser. You don't need Blade for this.
You would use Laravel to provide the base view (index.blade.php) which would include the React JS app, but then after that all the views and routing would be handled by React.
Here's a link to get you started.
https://medium.com/#rajikaimal/laravel-loves-reactjs-8c02f8b9d1d5
I have created laravel reactjs starter project .. refer the github project below.
I am not using the mix api of laravel since I want reactjs app to be portable to any other server or standalone app
refer the link below
https://medium.com/#padmanabhavn/bringing-laravel-and-reactjs-together-8c970cb0f65d
This question seems old but I will still share my experience for others.
This tutorial and project sample may be found useful.
https://blog.pusher.com/react-laravel-application/
https://github.com/maarcz/taskman
As well as that, the solution below has worked for me in webpack.mix.js without using app.js to be mixed up with other requirements (laravel 8):
mix.js('resources/assets/js/react', 'public/js/reactJs').react()
in blade:
<script src="{{ asset('js/reactJs/react.js') }}"></script>

Resources