This guide provides instructions on how to set up and run the website locally on your machine.
Before you begin, ensure you have the following installed:
- PHP
- Composer
- MySQL
- Node.js and NPM
-
Clone the repository:
git clone https://github.com/ShoyebWritesCode/Product-Catalog-Laravel.git cd Product-Catalog-Laravel
-
Install PHP Dependencies:
composer install
-
Install Node Dependencies:
npm install
-
Generate .env file and APP_KEY:
cp .env.example .env php artisan key:generate
-
Configure Database:
DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=product_catalogue DB_USERNAME=root DB_PASSWORD=
-
Setup Google smtp:
MAIL_MAILER=smtp MAIL_HOST=smtp.gmail.com MAIL_PORT=465 [email protected] MAIL_PASSWORD="your-generated-password" MAIL_ENCRYPTION=tls MAIL_FROM_ADDRESS="[email protected]" MAIL_FROM_NAME="Yoursite.com"
-
Run Database Migrations and Seeders:
php artisan migrate --seed
-
Setup Storage Link:
php artisan storage:link cp -R public/images public/storage
-
Build Front-end Assets:
# Option 1: Build for production npm run build # Option 2: Build for development npm run dev
-
Start the Development Server:
php artisan serve
- Username:
[email protected]
- Password:
admin 1234
-
Option 1: Existing User
- Username:
[email protected]
- Password:
user 1234
- Username:
-
Option 2: Register as a New User
- Visit the registration page and create a new account.
- After registration, use the credentials you created to log in.