GithubHelp home page GithubHelp logo

bvrignaud / ci4-admin Goto Github PK

View Code? Open in Web Editor NEW
25.0 8.0 8.0 43 KB

Admin module for CodeIgniter 4 based on IonAuth and AdminLTE

License: MIT License

PHP 99.97% Hack 0.03%
codeigniter4 ionauth adminlte

ci4-admin's Introduction

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');
	});
});

ci4-admin's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ci4-admin's Issues

Not working with CI 4.0.0rc1

Hello,
it's a good job but i'va tried to install the module on the rc1 but it doesn't work, I think that there's a problem with the rc1 and not from your module cause no modules work.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.