Skip to content
Admin module for CodeIgniter 4 based on IonAuth and AdminLTE
Branch: master
Clone or download
Latest commit 8cc62d7 Dec 18, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src fix some codign styles errors/warnings Dec 18, 2018
.gitignore change .gitignore Dec 4, 2018
.travis.yml create .travis.yml Dec 18, 2018
CONTRIBUTING.md Create CONTRIBUTING.md Dec 17, 2018
LICENSE Initial commit Dec 4, 2018
README.md improve README.md Dec 18, 2018
composer.json add php 7.1 and codeigniter4/framework to require in composer.json Dec 18, 2018
env add mains files Dec 4, 2018
phpcs.xml add coding rules Dec 18, 2018

README.md

ci4-admin

Build Status

Admin module for CodeIgniter 4 based on AdminLTE 3

Installing ci-admin

Before installing, please check that you are meeting the minimum server requirements.

There are different ways to install this package.

  1. With composer
$ composer require bvrignaud/ci4-admin

  1. With Git:
my-project$ git clone https://github.com/bvrignaud/ci4-admin.git

Then in your Config/Autoload.php, add this :

'IonAuth' => ROOTPATH . 'YOUR-ION_AUTH-FOLDER',
'Admin'   => ROOTPATH . 'ci4-admin',

  1. Download the archive, and move folder from this package to the root folder:
CI                          # → Root Directory
├── application/
├── ion-auth/               # → Ion-auth directory
├── public
├──...

Then in your Config/Autoload.php, add this :

'IonAuth' => ROOTPATH . 'YOUR-ION_AUTH-FOLDER',
'Admin'   => ROOTPATH . 'ci4-admin',

Install css/js dependencies

$ cd public/assets
$ yarn add admin-lte@v3

Use it

Add routes configs in 'Config\Routes.php':

$routes->group('auth', ['namespace' => 'IonAuth\Controllers'], function ($routes) {
	$routes->get('/', 'Auth::index');
	$routes->add('login', 'Auth::login');
	$routes->get('logout', 'Auth::logout');
	$routes->get('forgot_password', 'Auth::forgot_password');
});

$routes->group('admin', ['namespace' => 'Admin\Controllers'], function ($routes) {
	$routes->get('/', 'Home::index');

	$routes->group('users', ['namespace' => 'Admin\Controllers'], function ($routes) {
		$routes->get('/', 'Users::index');
		$routes->add('create', 'Users::createUser');
		$routes->add('edit/(:num)', 'Users::edit/$1');
		$routes->add('activate/(:num)', 'Users::activate/$1');
		$routes->add('deactivate/(:num)', 'Users::deactivate/$1');
		$routes->add('edit_group/(:num)', 'Users::editGroup/$1');
		$routes->add('create_group', 'Users::createGroup');
	});

	$routes->group('informations', ['namespace' => 'Admin\Controllers'], function ($routes) {
		$routes->get('/', 'Informations::index');
		$routes->get('displayPhpInfo', 'Informations::displayPhpInfo');
		$routes->add('exportDatabase', 'Informations::exportDatabase');
		$routes->post('sendEmailForTest', 'Informations::sendEmailForTest');
	});
});
You can’t perform that action at this time.