ModStartCMS is a background system framework based on Laravel modular organization

brief introduction
ModStart is a background system framework based on Laravel modular organization. It can quickly build a fully functional background system with little code. The module market contains rich modules, which can be used out of the box, so that developers can improve efficiency from lengthy code and are very friendly to back-end developers.

Technology stack
Laravel
LayUI
Vue
Element UI
jQuery
...
characteristic
Simple, elegant, flexible and scalable
Background RBAC permission management
Ajax page no refresh
Component loads static resources on demand
Built in rich common table functions
Built in file upload, no cumbersome development
Module market, you can complete the installation, update and uninstall of plug-ins by clicking the mouse on the management page
communication
Join us
If you are interested in this project, you are welcome to join the project development team and participate in the function maintenance and development of this project.

Contributions in any form are welcome (including but not limited to the following):

Contribution code
Improve documentation
Writing tutorials
Perfect notes
...
Version policy
The version release of ModStart will refer to the release strategy of the mainstream web framework, minimize the impact of version upgrade, consider the compatibility issue to the greatest extent, and try not to change any functional interface in the upgrade of small version; At the same time, we will also provide an update log, detailing the changes of the new version and the possible impact.

For the release of small versions, developers can safely upgrade without worrying about code compatibility. Only large version upgrades such as v2.0.0 to v3.0.0 may have compatibility problems, while small versions are basically fully compatible (small version upgrades may also have incompatibility, but the probability is very small).

install
Environmental requirements
PHP >= 5.6
MySQL >= 5.0
PHP Extension: Fileinfo
Apache/Nginx
Installation steps
To configure the apache/nginx server, please configure the root directory of the website to < Website Directory > / public
visit www.xxx.com/install.php
Use the installation boot wizard to install

Nginx reference configuration

server {
    listen       80;
    server_name  xx.com;x
    charset utf-8;
    index index.php index.html;
    root /var/www/html/xxx.com/public;
    autoindex off;
    location ^~ /.git {
        deny all;
    }
    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }
    location ~ \.php$ {
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  PHP_VALUE  "open_basedir=/var/www/html/xxx.com/:/tmp/:/var/tmp/";
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        include fastcgi_params;
    }
    location ~ \.(gif|jpg|jpeg|png|bmp|ico|css|js)$ {
       expires max;
    }
    location ~* \.(eot|ttf|woff|woff2)$ {
        add_header Access-Control-Allow-Origin '*';
    }
}

Apache reference configuration

<VirtualHost *:80>
      ServerName xxx.com
      DocumentRoot d:/wwwroot/xxx.com/public
</VirtualHost>

Integrated environment
Pagoda one click installation tutorial: to be improved
PHPStudy opinion installation tutorial: to be improved
Environmental pre inspection
In order to facilitate the rapid configuration of the system environment, we provide a server-side installation environment pre check program. The usage is as follows:

Download files via connection modstart.com/env_check.zip , extract env_check.php file.
Set env_ The check.php file is uploaded to the server space and accessed through configuration www.xxx.com/env_check.php To check whether the installation environment is successfully configured. If the environment pre check is successful, you can see the following prompt.

Upgrade Guide
Before upgrading, please back up the source code, data and other information of the system, and follow the following steps.

Get the latest ModStart source code package
Full coverage of all source code
Use the command line to enter the root path of the system, run php artisan migrate, and rebuild the public/asset directory and all basic service codes;
Use the command line to enter the root path of the system, run PHP artists mod start: module install all, and rebuild the public/vendor directory and all extension package codes.
Quick start
In daily development, the most common is to add, delete, modify and query codes. Developing such functions with ModStart will become very simple.

The following will introduce you to the use of ModStart and the basic composition of an addition, deletion, modification and query page. Learning the following content will help you quickly understand the basic usage of the system.

Create data table
Create a database migration file in the migration directory of Laravel

class CreateNews extends Migration
{
    public function up()
    {
            Schema::create('news', function (Blueprint $table) {
                $table->increments('id');
                $table->timestamps();
                $table->string('title', 200)->nullable()->comment('');
                $table->string('cover', 200)->nullable()->comment('');
                $table->string('summary', 200)->nullable()->comment('');
                $table->text('content')->nullable()->comment('');
            });
        }
    }
    public function down()
    {
    }
}

Create controller
Add the routing controller code according to

class NewsController extends Controller
{
    use HasAdminQuickCRUD;
    protected function crud(AdminCRUDBuilder $builder)
    {
        $builder
            ->init('news')
            ->field(function ($builder) {
                $builder->id('id','ID');
                $builder->text('title', 'name');
                $builder->image('cover', 'cover');
                $builder->textarea('summary', 'abstract');
                $builder->richHtml('content', 'content');
                $builder->display('created_at', 'Creation time');
                $builder->display('updated_at', 'Update time');
            })
            ->gridFilter(function (GridFilter $filter) {
                $filter->eq('id', 'ID');
                $filter->like('title', 'title');
            })
            ->title('News management');
    }
}

Add routing and navigation
Add routing information in routes.php

$router->match(['get', 'post'], 'news/news', 'NewsController@index');
$router->match(['get', 'post'], 'news/news/add', 'NewsController@add');
$router->match(['get', 'post'], 'news/news/edit', 'NewsController@edit');
$router->match(['get', 'post'], 'news/news/delete', 'NewsController@delete');
$router->match(['get', 'post'], 'news/news/show', 'NewsController@show');

Register menu information in ModuleServiceProvider.php

AdminMenu::register(function () {
  return [
    [
      'title' => 'News management',
      'icon' => 'list',
      'sort' => 150,
      'url' => '\App\Admin\Controller\NewsController@index',
    ]
  ];
});
``````php
AdminMenu::register(function () {
  return [
    [
      'title' => 'News management',
      'icon' => 'list',
      'sort' => 150,
      'url' => '\App\Admin\Controller\NewsController@index',
    ]
  ];
});
``````php
AdminMenu::register(function () {
  return [
    [
      'title' => 'News management',
      'icon' => 'list',
      'sort' => 150,
      'url' => '\App\Admin\Controller\NewsController@index',
    ]
  ];
});
``````php
AdminMenu::register(function () {
  return [
    [
      'title' => 'News management',
      'icon' => 'list',
      'sort' => 150,
      'url' => '\App\Admin\Controller\NewsController@index',
    ]
  ];
});

Development completed
Such a simple addition, deletion, modification and query page is developed

Required reading before development
Pre development configuration
For the development environment, please open the debug mode (that is, set APP_DEBUG=true in the. env file)

Common style
ModStart uses some basic styles to layout the page, which is simple and powerful. You need to know this before you start development.

Public style is very helpful for writing page components and can significantly improve development efficiency. It is recommended to review the document before writing components.

LICENSE
Apache 2.0

Tags: Laravel cms

Posted on Wed, 22 Sep 2021 04:29:44 -0400 by robin