• Stars
    star
    155
  • Rank 240,864 (Top 5 %)
  • Language
    PHP
  • License
    MIT License
  • Created almost 5 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

CodeIgniter4 Boilerplate based on AdminLTE 3 with user management, roles, permissions, ...

CodeIgniter 4 Application Boilerplate

This package for CodeIgniter 4 serves as a basic platform for quickly creating a back-office application. It includes profile creation and management, user management, roles, permissions and a dynamically-generated menu.

Feature

This project is still early in its development... please feel free to contribute!

Screenshoot | Demo On Heroku

Dashboard

Installation

1. Get The Module

composer require agungsugiarto/boilerplate

2. Set CI_ENVIRONMENT, baseURL, index page, and database config in your .env file based on your existing database (If you don't have a .env file, you can copy first from env file: cp env .env first). If the database does not exist, create the database first.

# .env file
CI_ENVIRONMENT = development

app.baseURL = 'http://localhost:8080'
app.indexPage = ''

database.default.hostname = localhost
database.default.database = boilerplate
database.default.username = root
database.default.password =
database.default.DBDriver = MySQLi

3. Run publish auth

php spark auth:publish

Publish Migration? [y, n]: y
  created: Database/Migrations/2017-11-20-223112_create_auth_tables.php
  Remember to run `spark migrate -all` to migrate the database.
Publish Models? [y, n]: n
Publish Entities? [y, n]: n
Publish Controller? [y, n]: n
Publish Views? [y, n]: n
Publish Filters? [y, n]: n
Publish Config file? [y, n]: y
  created: Config/Auth.php
Publish Language file? [y, n]: n

NOTE: Everything about how to configure auth you can find add Myth/Auth.

Is it ready yet? Not so fast!! ;-) After publishing Config/Auth.php you need to change public $views with these lines below:

public $views = [
    'login'           => 'agungsugiarto\boilerplate\Views\Authentication\login',
    'register'        => 'agungsugiarto\boilerplate\Views\Authentication\register',
    'forgot'          => 'agungsugiarto\boilerplate\Views\Authentication\forgot',
    'reset'           => 'agungsugiarto\boilerplate\Views\Authentication\reset',
    'emailForgot'     => 'agungsugiarto\boilerplate\Views\Authentication\emails\forgot',
    'emailActivation' => 'agungsugiarto\boilerplate\Views\Authentication\emails\activation',
];

Open app\Config\Filters.php, find $aliases and add these lines below:

public $aliases = [
    'login'      => \Myth\Auth\Filters\LoginFilter::class,
    'role'       => \agungsugiarto\boilerplate\Filters\RoleFilter::class,
    'permission' => \agungsugiarto\boilerplate\Filters\PermissionFilter::class,
];

4. Run publish, migrate and seed boilerplate

php spark boilerplate:install

5. Run development server:

php spark serve

6. Open in browser http://localhost:8080/admin

Default user and password
+----+--------+-------------+
| No | User   | Password    |
+----+--------+-------------+
| 1  | admin  | super-admin |
| 2  | user   | super-user  |
+----+--------+-------------+

Settings

Config Boilerplate

You can configure default dashboard controller and backend theme in app\Config\Boilerplate.php,

class Boilerplate extends BaseConfig
{
    public $appName = 'Boilerplate';

    public $dashboard = [
        'namespace'  => 'agungsugiarto\boilerplate\Controllers',
        'controller' => 'DashboardController::index',
        'filter'     => 'permission:back-office',
    ];
// App/Config/Boilerplate.php

Usage

You can find how it works with the read code routes, controller and views etc. Finnally... Happy Coding!

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Contributions are very welcome.

License

This package is free software distributed under the terms of the MIT license.

More Repositories

1

codeigniter4-ajax-crud

Example CodeIgniter 4 ajax crud with serverside datatable.
PHP
78
star
2

codeigniter4-cors

The codeigniter4-cors package allows you to send Cross-Origin Resource Sharing headers with Codeigniter4 filter configuration.
PHP
65
star
3

codeigniter4-authentication

The codeigniter4\authentication component provides an API for authentication and includes concrete authentication adapters for common use case scenarios.
PHP
49
star
4

codeigniter4-authentication-jwt

JSON Web Token for codeigniter4-authentication. This package is port from tymondesigns/jwt-auth for compability with agungsugiarto/codeigniter4-authentication.
PHP
27
star
5

codeigniter4-eloquent

The Illuminate Database package for CodeIgniter 4
PHP
25
star
6

codeigniter4-shoppingcart

A simple shoppingcart implementation for CodeIgniter4.
PHP
21
star
7

codeigniter4-realworld-api

PHP
16
star
8

codeigniter4-orm

A Fluent ORM based model and query builder for CodeIgniter4.
PHP
12
star
9

codeigniter4-whoops

Whoops PHP Errors For CodeIgniter4.
PHP
11
star
10

codeigniter4-repository

Implementation of repository pattern for CodeIgniter 4. The package allows out-of-the-box filtering of data based on parameters in the request, and also allows you to quickly integrate the list filters and custom criteria.
PHP
10
star
11

codeigniter4-authentication-demo

PHP
6
star
12

codeigniter4-inspiring

Notepad++ easter egg quotes and have a lot more inspiration for CodeIgniter 4.
PHP
3
star
13

boilerplate-codeigniter4

PHP
3
star
14

laravel-ajax-crud

Program sederhana Ajax Crud dengan Laravel 5.8.
PHP
1
star
15

lumen-api-wilayah-indonesia

PHP
1
star