This article mainly talks about the things that novices must know in the process of learning laravel. It has certain reference value and friends who are preparing to learn the laravel framework must not miss it. I hope it will be helpful to you after reading it.
1. Laravel environment setup
1. Please refer to the following link for environment setup in window environment:
Development environment setup - Windows | "Laravel Development Environment Deployment" | PHP / Laravel Community Documentation
https://laravel-china.org/docs/laravel-development-environment /5.5/development-environment-windows/938
2. Issues needing attention
The following are all based on the default environment. Operation
1. Download the Laravel project and log in to the database
homestead / secret
2. Drive the virtual machine through vagrant
cd ~/Homestead && vagrant up
3. Bash login to the virtual machine
vagrant ssh
4. VirtualBox login to the virtual machine. The default account password is:
vagrant / vagrant
5 , The directory where the Nginx configuration file is located
vim /etc/nginx/nginx.confcd /etc/nginx/sites-available (所有站点配置文件)
6. Laravel built-in command line use
Switch to the root directory of the Laravel project through command line instructions , the command form is:php artisan (specific command)
For example:
(1), clear view cache
php artisan view:clear
(2), clear running cache
php artisan cache:clear
(3), clear Configure cache
php artisan config:clear
7. Configure multi-site
Configure multi-site through homestead.yaml, you need to execute:
vagrant provision
This operation will reconstruct the database and is not recommended. The following command can be used instead, which applies the changes to the applicability.
vagrant reload --provision
Related tutorials:laravel video tutorial
The above is the detailed content of Laravel framework learning tutorial for beginners. For more information, please follow other related articles on the PHP Chinese website!