Laravel course project
The project is deployed locally using:
nginx-1.18
;php7.4-fpm
;mysql-server-8.0
;memcached-1.5
;redis-server-5.0
;nodejs-16.5
.
OS: Ubuntu 20.04.2 LTS (native & under WSL on Windows 10).
Installed by command: composer create-project laravel/laravel --prefer-dist /path/to/project
Added tests via libraries:
squizlab/php_codeshiffer
(checks code style)phpmd/phpmd
(mess detecting)phpstan/phpstan
(static analysis)
The main folders in which the development is carried out are passed through these tests: app
, database
& tests
. Based on the test results, small errors in the scripts generated automatically when the project was created were identified and fixed.
Steps:
- create an empty database on your mysql server;
- execute
make install
(enter database credentials during the installation); - copy
siteconf/nginx.conf
to/etc/nginx/sites-enabled/laravel-course-project.conf
and fix there paths project; - restart
nginx
(/etc/init.d/nginx restart
) & open http://localhost:8081/ in browser.
During the launch of the “dbinit” command, about 25 users will be created. Among them: “user”, “moder” and “admin” with respective roles. For convenience, usernames and passwords are the same.
After that, about fifty articles and 10-20 comments to them will be created. Authors and statuses of articles and comments are distributed randomly.
Unit tests were not created because it was not necessary by the condition of the course. Therefore, the project contains only tests installed with the project by default.