Download the PHP package samsonasik/ci4-vue without Composer
On this page you can find all versions of the php package samsonasik/ci4-vue. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download samsonasik/ci4-vue
More information about samsonasik/ci4-vue
Files in samsonasik/ci4-vue
Package ci4-vue
Short Description CodeIgniter4 starter app with Vue.js Integration
License MIT
Homepage https://codeigniter.com
Informations about the package ci4-vue
Example Using Vue.js in CodeIgniter 4 application
Version ^0.1.0 is for Vue 3 usage in CodeIgniter 4 application
For Vue 2 usage in CodeIgniter 4 application, you can use version ~0.0.17
Introduction
A CodeIgniter 4 Skeleton Application with Vue.js integration.
Features
- SPA application with Vue Router with cached pages after visited.
- Using server side template from CodeIgniter 4, compiled with
Vue.compile()
in Vue.js component'srender()
. - Using Vuex for state management library, combo with sessionStorage on portfolio page.
- Webpack support for production
Setup
1. Run composer create-project command:
2. Copy file ci4-vue/env
to ci4-vue/.env
:
3. Set environment and app configuration
Open ci4-vue/.env
and set CI_ENVIRONMENT
, app.baseURL
, app.indexPage
:
4. Run PHP Development server
5. Open web browser http://localhost:8080
Production
For deploy to production purpose, it has webpack.config.js
in root directory that when we run webpack
command, we can get public/js/dist/bundle.js
after run it. If you don't have a webpack
installed yet in your system, you can install nodejs and install webpack
and webpack-cli
:
So, we can run:
After it generated, we can update .env
file as follow:
In app/Views/layout.php
, we have a ENVIRONMENT
check to use js/app.js
when on development, and use /js/dist/bundle.js
on production when exists.
that will automatically take care of that.