Welcome to the Laravel Web Shop! This application is designed to provide a seamless shopping experience with advanced features and secure payment integration. Below you'll find a detailed overview of the technologies used, features available, and instructions for setting up and running the application.
Clone the repository:
git clone https://github.com/jareerzeenam/laravel-webshop.git
cd laravel-web-shop-app
Install dependencies:
composer install
npm install
npm run dev
Environment configuration:
Copy the .env.example
file to .env
and update the necessary environment variables, especially for database and Stripe API keys.
cp .env.example .env
php artisan key:generate
Run migrations:
php artisan migrate
Run the application:
php artisan serve
Set up email notifications:
Ensure that your email settings are correctly configured in the .env
file to enable email notifications for abandoned carts and order confirmations.
Install Stripe CLI: Download the Stripe CLI from the following link: Stripe CLI
Listen to webhook events locally: After installing the Stripe CLI, run the following command to listen to webhook events:
stripe listen --forward-to YOUR_LOCAL_URL/stripe/webhook --format JSON
Set up webhook secret:
Get the webhook signing secret from the Stripe dashboard and add it to the .env
file as STRIPE_WEBHOOK_SECRET
.
STRIPE_WEBHOOK_SECRET=whsec_...
This feature sends an email reminder to users daily if they have items in their cart but haven't completed the purchase.
app/Console/Commands/AbandonedCart.php
routes/console.php
to run daily:Schedule::command(AbandonedCart::class)->dailyAt('9:00');
This feature deletes guest carts that have been inactive for more than a day.
app/Console/Commands/RemoveInactiveSessionCart.php
routes/console.php
to run weekly:Schedule::command(RemoveInactiveSessionCart::class)->weekly();
Once the application is set up, you can start exploring the various features:
For any issues or contributions, please create an issue or a pull request on the GitHub repository.
Happy Coding!