Home >PHP Framework >Laravel >MeEdu, an online on-demand system developed based on Laravel
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!
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
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
Configure basic information
APP_NAME=MeEdu APP_ENV=local(这里如果正式运行,请修改为:production) APP_KEY= APP_DEBUG=true(这里如果是正式运行,请修改为:false) APP_LOG_LEVEL=debug APP_URL=http://localhost(这里修改你自己的地址)
Step 3
Create a soft link to the upload directory:
php artisan storage:link
Step 4
Set the storage directory permissions to 777
chmod -R 0777 storage
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; }
Step 6
Install data table
php artisan migrate
Step 7
Initialize system permissions:
php artisan install role
Initialize administrator:
php artisan install administrator
The installation prompts you to enter the administrator’s account and password!
Initialize the background menu:
php artisan install backend_menu
Generate the installation lock (this step is crucial)
php artisan install:lock
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
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
Configure supervisor
cd /etc/supervisor/conf.d vi meedu.conf
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
Be careful to replace the path and user
Restart the service:
sudo supervisorctl reread sudo supervisorctl update sudo supervisorctl start meedu:*
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
##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!