- PHP 8.2
- Laravel 10
- Sail 1.26
- Nodejs 20
- MySQL 8.0.32
- Tailwindcss 3.2.4
- DaisyUI 4.4.11
- Guzzlehttp 7.2
- Breeze 1.26
- jQuery 3.6.4
sudo apt update
sudo apt install php-cli unzip -y
curl -sS https://getcomposer.org/installer -o /tmp/composer-setup.php
sudo php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer
Setup env and docker (make sure you have install php composer or following the optional step above):
cd PriceCompare
git checkout develop
composer require laravel/sail --dev
- Following install step.
- After installed, test the sail using:
./vendor/bin/sail -v
It should be
docker-compose version X.X.X, build ....
- Change .env.example to .env
touch .env
cat .env.example >> .env
- Following this tutorial from Geeksforgeeks: Click here
Setup env and docker (make sure you have install php composer or following the optional step above):
- Open powershell (not cmd):
cd PriceCompare
git checkout develop
composer require laravel/sail --dev
- Following install step.
- After installed, test the sail using:
./vendor/bin/sail -v
It should be
docker-compose version X.X.X, build ....
- Change .env.example to .env
touch .env
cat .env.example >> .env
./vendor/bin/sail up --build -d
You can remove the --build flag in the next time you start (Only when changed anything in the docker then you need this flag).
./vendor/bin/sail composer install
./vendor/bin/sail npm install
./vendor/bin/sail artisan optimize
- When install completed:
./vendor/bin/sail npm run dev
The website is up: http://localhost:80
./vendor/bin/sail artisan migrate:refresh --seed
Using this command with site argument is name of site:
./vendor/bin/sail artisan scrape:<site>
Sites supported:
site | argument | status |
---|---|---|
Tiki | tiki | working |
The Gioi Di Dong | tgdd | working |
FPT Shop | fpt | working |
Dien Thoai Gia Kho | dtgk | working |
Phong Vu | pv | working |
Di Dong Viet | ddv | working |
example: You wanna crawl tgdd then:
./vendor/bin/sail artisan scrape:tgdd