- Create CRUD using CodeIgniter 4 with Vue.JS 3 + axios.
- Also make chart using ApexChart. -css framework bootstrap.
- Icon using remixicon.
- Clone this repository.
- Run
composer install
, thencomposer update
if needed. - Run
php spark migrate
orphp spark migrate:rollback
. if needed. - Run
php spark db:seed DataSeeder
. if needed. - Run development server using
php spark serve
.
Copy env
to .env
and tailor for your app, specifically the baseURL
and any database settings.
in Head
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link href="https://cdn.jsdelivr.net/npm/remixicon@2.5.0/fonts/remixicon.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css" />
in Lower Body
<script src="https://cdn.jsdelivr.net/npm/vue@2.7.13/dist/vue.js"></script>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js" integrity="sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.min.js" integrity="sha384-cVKIPhGWiC2Al4u+LWgxfKTRIcfu0JTxR+EQDz/bgldoEyl4H0zUF0QKbrJ0EcQF" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/apexcharts"></script>
index.php
is no longer in the root of the project! It has been moved inside the public folder,
for better security and separation of components.
This means that you should configure your web server to "point" to your project's public folder, and not to the project root. A better practice would be to configure a virtual host to point there. A poor practice would be to point your web server to the project root and expect to enter public/..., as the rest of your logic and the framework are exposed.
Please read the user guide for a better explanation of how CI4 works!
PHP version 7.4 or higher is required, with the following extensions installed:
Additionally, make sure that the following extensions are enabled in your PHP: