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 wander around in the project source files in order to brush up your knowledge.
- Clone the repo:
- Open a terminal window in C:\sites_laravel
- Execute the statement
git clone https://github.com/pverhaert/learn_php8.git php8
- Remove the .git folder
- Open a PhpStorm in the project folder C:\sites_laravel\php8
- Execute the command
npm install
- Execute the command
npm run watch
- This command opens a browser window with URL http://localhost:5500, which serves as a proxy for http://php8.test
- When changes are detected in relevant files (CSS, JS, PHP), the page on http://localhost:5500 gets reloaded via Browsersync.
- Pages on http://php8.test are not reloaded automatically, but you can do this manually with the browser refresh button.
- Execute the command
Known issues
If your site does not load on `http://localhost:5500/, try the following steps:
HTTPS is disabled in Herd
- Stop the watch-script
- Open webpack.mix.js and change
port: 5500
to a different port (e.g.port: 5555
) - Run
npm run watch
and try to load the site again
HTTPS is enabled in Herd
- Stop the watch-script
- Open webpack.mix.js and change
proxy: 'php8.test',
toproxy: https://php8.test
, - Run
npm run watch
and try to load the site again