Appearance
Example project
- The project Learn PHP8 with all course examples (and exercises) can be found in this Github repository.
REMARKS
- An online version of this project (with previews of the solved exercises) can be found at https://php8.z01.be/
- In this project, we use Tailwind CSS for the design. Although this is not the main topic of this course, it may be interesting to explore the project source files to brush up on your knowledge.
Clone the repo
- Open a terminal window in C:\sites_laravel.
- Execute the statements:
bash
git clone https://github.com/pverhaert/learn_php8.git php8
cd php8
rm -rf .git
npm install
1
2
3
4
2
3
4
Configure Herd
- Open Herd and navigate to Sites.
- Click on the three dots in the top right corner and select Show sites without valid driver to make our example project visible.
- Click on the lock icon so the site is served via HTTPS.
Run the project
- Open a PhpStorm in the project folder C:\sites_laravel\php8 .
- Execute the command
npm run watch
.- This command opens a browser window with URL http://localhost:5500, which serves as a proxy for https://php8.test.
- When changes are detected in relevant files (CSS, JS, PHP), the page on http://localhost:5500 gets reloaded via Browsersync.
- Pages on https://php8.test are not reloaded automatically, but you can do this manually with the browser refresh button.
- Execute the command