PHP code example of ifui / webman-module

1. Go to this page and download the library: Download ifui/webman-module 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/ */

    

ifui / webman-module example snippets




return [
    "paths" => [
        "migrations" => "database/migrations",
        "seeds" => "database/seeds"
    ],
    "environments" => [
        "default_migration_table" => "phinxlog",
        "default_database" => "dev",
        "default_environment" => "dev",
        "dev" => [
            "adapter" => "DB_CONNECTION", // 修改此处 e.g. env('DB_CONNECTION')
            "host" => "DB_HOST", // 修改此处
            "name" => "DB_DATABASE", // 修改此处
            "user" => "DB_USERNAME", // 修改此处
            "pass" => "DB_PASSWORD", // 修改此处
            "port" => "DB_PORT", // 修改此处
            "charset" => "utf8"
        ]
    ]
];



/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
*/

use Webman\Route;

Route::get('/hello', function () {
    return response(config('plugin.apple.app.name'));
});
shell
# 升级配置文件
php webman plugin:install ifui/webman-module

/plugin/
  ├── apple/
      ├── app/
          ├── controller/
              ├── Index.php 
          ├── middleware/
          ├── model/
          ├── providers/
              ├── AppServerProvider.php
          ├── view/
          ├── functions.php
      ├── config/
          ├── app.php
      ├── database/
          ├── migrations/
          ├── seeds/
      ├── route
          ├── admin.php
          ├── api.php
          ├── web.php
      ├── tests/
      ├── composer.json
      ├── module.json
      ├── README.md
      ├── LICENSE.md
shell
php webman module:start apple
shell
php webman module:stop apple
shell
php webman module:create
shell
php webman module:make-controller Admin/Post --module=apple
shell
php webman module:make-test unit/AppleTest --module=apple