GithubHelp home page GithubHelp logo

ma3achou / boilerplate Goto Github PK

View Code? Open in Web Editor NEW

This project forked from agungsugiarto/boilerplate

0.0 0.0 0.0 2.99 MB

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

License: MIT License

PHP 100.00%

boilerplate's Introduction

CodeIgniter 4 Application Boilerplate

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

Feature

This project is early on development feel free to contribute

Screenshoot | Demo On Heroku

Dashboard

Installation

1. Get The Module, since packages myth/auth still on development we need to change composer.json in root project directory. Open composer.json with your text editor and add code like this, or below like this.

"minimum-stability": "dev",
"prefer-stable": true,

And run require via composer

composer require agungsugiarto/boilerplate

2. Set CI_ENVIRONMENT, base url, 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 not exists, create 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.

Its done ? not to fast. After the publish Config/Auth.php you need to change public $views with below like this.

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 see at $aliases add with below like this.

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 its work with the read code routes, controller and views etc. Finnaly 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.

boilerplate's People

Contributors

agungsugiarto avatar rubensrocha avatar

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.