定制 smartedutech/littelframeworkapp 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

smartedutech/littelframeworkapp

最新稳定版本:0.2

Composer 安装命令:

composer create-project smartedutech/littelframeworkapp

包简介

skeleton for small mvc application

README 文档

README

Introduction

--Version This is a application skeleton application using the litelleframwork MVC layer and module systems. This application is meant to be used as a starting place for those looking to get their feet wet with litelleframwork MVC.

Installation using Composer

The easiest way to create a new litelleframwork MVC project is to use Composer. If you don't have it already installed, then please install as per the documentation.

To create your new littelframework MVC project:

$ composer create-project -sdev smartedutech/littelframeworkapp path/to/install

Once installed, you can test it out immediately using PHP's built-in web server:

$ cd path/to/install
$ php -S 0.0.0.0:8080 -t public
# OR use the composer alias:
$ composer run --timeout 0 serve

This will start the cli-server on port 8080, and bind it to all network interfaces. You can then visit the site at http://localhost:8080/

  • which will bring up litelleframwork MVC Skeleton welcome page.

Note: The built-in CLI server is for development only.

Development mode

You cas use a simple generator included in this project. the generator is a package named smartedutech/litelle-framework-generator

 $ composer require smartedutech/litelle-framework-generator

the file used to generate your CRUD is '/public/generator.php'

Development mode configure generator

to configure the crud you must implement this file 'vendor\smartedutech\litelle-framework-generator\src\Configgen\module.php' the file content the name of package and the name of your controllers and actions with the database tables

$_APP_CONF=array(
    "APPNAME"=>"e-lab-reservation"
);
 "modules"=>array(
        "admin"=>array(
            "name"=>"admin"
            ,"Controller"=>array(
            )
        )
 )

''controllers configure "roles"=>array( "name"=>"roles", "actions"=>array() )


```action configure
"{Controller}"=>array(
       "name"=>"{Controller}",
       "actions"=>array(
           "edit{Table}"=>array(
               "Type"=>"simple"//"AJAX"
               ,'Role'=>"edit"//lister | consulter | gestion | delete | save
               ,"view"=>array(
                 "view"=>true
                 ,"layout"=>false
                 ,"pages"=>array(
                       "edit"=>"edit{Table}"
                       ,"lister"=>"lister{Table}"
                       //,"id"=>"id{Table}"
                     )
               )
               ,"activity"=>"edit"
               ,"form"=>"form{Table}"
               ,"model"=>array(
                   "table"=>"{Table}"
               )
           ),
       )

Running Unit Tests

Once testing support is present, you can run the tests using:

$ ./vendor/bin/phpunit

Web server setup

Apache setup

To setup apache, setup a virtual host to point to the public/ directory of the project and you should be ready to go! It should look something like below:

<VirtualHost *:80>
    ServerName litelleframeworkapp.localhost
    DocumentRoot /path/to/litelleframeworkapp/public
    <Directory /path/to/litelleframeworkapp/public>
        DirectoryIndex index.php
        AllowOverride All
        Order allow,deny
        Allow from all
        <IfModule mod_authz_core.c>
        Require all granted
        </IfModule>
    </Directory>
</VirtualHost>

Nginx setup

To setup nginx, open your /path/to/nginx/nginx.conf and add an include directive below into http block if it does not already exist:

http {
    # ...
    include sites-enabled/*.conf;
}

it should look something like below:

server {
    listen       80;
    server_name  litelleframeworkapp.localhost;
    root         /path/to/litelleframeworkapp/public;

    location / {
        index index.php;
        try_files $uri $uri/ @php;
    }

    location @php {
        # Pass the PHP requests to FastCGI server (php-fpm) on 127.0.0.1:9000
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_param  SCRIPT_FILENAME /path/to/litelleframeworkapp/public/index.php;
        include fastcgi_params;
    }
} 
 

统计信息

  • 总下载量: 20
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 2
  • 开发语言: JavaScript

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-06-17