Home > PHP Framework > Laravel > MeEdu, an online on-demand system developed based on Laravel

MeEdu, an online on-demand system developed based on Laravel

藏色散人
Release: 2020-04-29 15:54:41
forward
2974 people have browsed it

The following tutorial column from laravel will introduce to you the online on-demand system "MeEdu" developed based on Laravel. I hope it will be helpful to friends in need!

MeEdu, an online on-demand system developed based on Laravel

https://github.com/Qsnh/meedu

Author’s Foreword:

With the rise of the field of knowledge payment, especially the success of "get", the leader in the field of knowledge payment, the field of knowledge payment has become a new trend. After several years of development, the infrastructure in the field of knowledge payment has made great progress. Many knowledge payment platforms on the market can build their own set of knowledge payment applications in just a few minutes. However, this is not what I want! Perhaps from a programmer's perspective, what I care more about is that I can fully control this application!

So MeEdu was born. MeEdu has pinned my expectations on the current field of paid knowledge. I believe that in the future, everyone with skills can use MeEdu to build their own paid knowledge applications and monetize their knowledge through MeEdu.

Installation Tutorial

Environment Requirements

Composer

PHP >= 7.2

MySql >= 5.6

Zip PHP Extension

OpenSSL PHP Extension

PDO PHP Extension

Mbstring PHP Extension

Tokenizer PHP Extension

XML PHP Extension

Step

Step 1

Install meedu

composer create-project qsnh/meedu=dev-master
Copy after login

Step 2

Configure the database, open the .env file, and modify the following content:

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret
Copy after login

Configure basic information

APP_NAME=MeEdu
APP_ENV=local(这里如果正式运行,请修改为:production)
APP_KEY=
APP_DEBUG=true(这里如果是正式运行,请修改为:false)
APP_LOG_LEVEL=debug
APP_URL=http://localhost(这里修改你自己的地址)
Copy after login

Step 3

Create a soft link to the upload directory:

php artisan storage:link
Copy after login

Step 4

Set the storage directory permissions to 777

chmod -R  0777 storage
Copy after login

Step 5

Configure pseudo-static and set the running directory of meedu to public.

Pseudo-static rules (Nginx):

location / {  
    try_files $uri $uri/ /index.php$is_args$query_string;  
}
Copy after login

Step 6

Install data table

php artisan migrate
Copy after login

Step 7

Initialize system permissions:

php artisan install role
Copy after login

Initialize administrator:

php artisan install administrator
Copy after login

The installation prompts you to enter the administrator’s account and password!

Initialize the background menu:

php artisan install backend_menu
Copy after login

Generate the installation lock (this step is crucial)

php artisan install:lock
Copy after login

Step 8

Go here , the website can be accessed normally. But if you want the entire program to run completely, subsequent configuration is required.

Backend login address: http://youdomain.com/backend/login

Step 9

Configure task scheduler:

Add the following content to the crontab scheduled task:

* * * * * php /path-to-your-project/artisan schedule:run >> /dev/null 2>&1
Copy after login

Note that the path is replaced with the path where meedu is located

Step 10

Configure the queue Listener:

First, install supervisor:

sudo apt install supervisor
Copy after login

Configure supervisor

cd /etc/supervisor/conf.d
vi meedu.conf
Copy after login

Paste the following content in:

[program:meedu]
process_name=%(program_name)s_%(process_num)02d
command=php /you-project-path/artisan queue:work --sleep=3 --tries=3
autostart=true
autorestart=true
user=root
numprocs=4
redirect_stderr=true
stdout_logfile=/you-project-path/storage/logs/supervisor.log
Copy after login

Be careful to replace the path and user

Restart the service:

sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl start meedu:*
Copy after login

If the configuration is correct, you will see the supervisor's output log, and the log path is the value of stdout_logfile configured above.

Demo

MeEdu, an online on-demand system developed based on Laravel

##Original address: https://xueyuanjun.com/post/9827

The above is the detailed content of MeEdu, an online on-demand system developed based on Laravel. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:xueyuanjun.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template