PHP code example of hamkamannan / adminigniter

1. Go to this page and download the library: Download hamkamannan/adminigniter library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

hamkamannan / adminigniter example snippets


public $defaultUserGroup = 'user';

public $views = [
  'login'           => 'hamkamannan\adminigniter\Views\auth\login',
  'register'        => 'hamkamannan\adminigniter\Views\auth\register',
  'forgot'          => 'hamkamannan\adminigniter\Views\auth\forgot',
  'reset'           => 'hamkamannan\adminigniter\Views\auth\reset',
  'emailForgot'     => 'hamkamannan\adminigniter\Views\auth\emails\forgot',
  'emailActivation' => 'hamkamannan\adminigniter\Views\auth\emails\activation',
];

public $allowRegistration = true;
public $

public $aliases = [
  'csrf'     => CSRF::class,
  'toolbar'  => DebugToolbar::class,
  'honeypot' => Honeypot::class,
  'login'         => \Myth\Auth\Filters\LoginFilter::class,
  'role'          => \hamkamannan\adminigniter\Filters\RoleFilter::class,
  'permission'    => \hamkamannan\adminigniter\Filters\PermissionFilter::class,
];

public $psr4 = [
  APP_NAMESPACE   => APPPATH, // For custom app namespace
  'App'           => APPPATH,
  'Config'        => APPPATH . 'Config',
  'DataTables'    => APPPATH . 'Libraries/DataTables',
  'Adminigniter'  => APPPATH . 'Adminigniter',
];
bash
php spark adminigniter:publish

Publish Database Migration? [y, n]: y
  created: Database/Migrations/20210101_000000_Auth
  created: Database/Migrations/20210101_000001_AuthAlterUser
  created: Database/Migrations/20210101_000002_Adminigniter
Publish Database Seed? [y, n]: y
  created: Database/Seeds/AdminigniterSeeder.php
Copy Public Assets? [y, n]: y
  created: public/assets/*
  created: public/themes/*
Copy Libraries? (Adminigniter Libraries/DataTables) [y, n]: y
  created: Libraries/DataTables//Utilities/*
  created: Libraries/DataTables/*
Patch View for HMVC? [y, n]: y
  created: vendor/codeigniter4/framework/system/View/View.php
bash
php spark db:seed AdminigniterSeeder

  Seeded: App/Database/Seeds/AdminigniterSeeder
bash
php spark module:create Dummy

  created: Adminigniter/Database/Migrations/2021-05-16-050256_Dummy.php
  created: Adminigniter/Modules/Backend/Dummy/Config/Routes.php
  created: Adminigniter/Modules/Backend/Dummy/Controllers/Dummy.php
  created: Adminigniter/Modules/Backend/Dummy/Controllers/Api/Dummy.php
  created: Adminigniter/Modules/Backend/Dummy/Models/DummyModel.php
  created: Adminigniter/Modules/Backend/Dummy/Views/list.php
  created: Adminigniter/Modules/Backend/Dummy/Views/add.php
  created: Adminigniter/Modules/Backend/Dummy/Views/update.php
bash
php spark serve --port 8888