This is a very simple project that uses Laravel to run a headless Chrome browser and scrape a website.
It uses the chrome-php package to run the headless browser.
-
Clone the repository
git clone [email protected]:alaminfirdows/laravel-headless-chrome.git
-
Install the dependencies
composer install
-
Copy the
.env.example
file to.env
cp .env.example .env
-
Generate the application key
php artisan key:generate
-
Create a new SQLite database
touch database/database.sqlite
-
Run the migrations
php artisan migrate
-
Install the NPM dependencies
yarn install
-
Build the assets
yarn build
-
Run the server
php artisan serve
-
Visit the website
http://localhost:8000