Skip to content

musman2002/SubscriptionPlatform

Repository files navigation

Laravel Subscription Platform

The Laravel Subscription Platform is a simple subscription management system that allows users to subscribe to websites and receive email notifications when new posts are published on those websites.

Prerequisites

  • PHP 7.* or 8.*
  • Composer
  • MySQL database
  • Laravel 8 (or compatible version)

Installation

  1. Clone the repository:

    git clone https://github.com/musman2002/SubscriptionPlatform.git
  2. Change to the project directory:

    cd SubscriptionPlatform
  3. Install composer dependencies:

    composer install
  4. Copy the .env.example file to .env and configure your database and email settings.

  5. Generate the application key:

    php artisan key:generate
  6. Run the database migrations:

    php artisan migrate
  7. Start the Laravel development server:

    php artisan serve
  8. Visit the application in your browser at http://localhost:8000.

Seeded Data

Seeded data for websites and users has been added to make it easier to test and use the system. You can customize the seeded data in the database seeders.

 php artisan db:seed --class=WebsiteSeeder
 php artisan db:seed --class=UserSeeder
 php artisan db:seed --class=SubscriptionSeeder

Endpoints

  • POST /api/websites/posts - Create a post for a specific website.
  • POST /api/websites/subscribe - Subscribe to a website.

Postman Collection

To explore and test the available APIs, import the Postman collection from the following link: Postman Collection

Database Configuration

The Laravel Subscription Platform uses a MySQL database for storing application data. To configure your database settings, update the .env file with your database connection details:

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=your_database_name
DB_USERNAME=your_database_user
DB_PASSWORD=your_database_password

Queue Connection

The application uses Laravel's built-in queue system for background job processing. To configure your queue connection, update the .env file with your desired queue driver:

QUEUE_CONNECTION=redis

Email Configuration

The Laravel Subscription Platform uses Laravel's email system to send notifications to subscribers. To configure your email settings, update the .env file with your email provider's details. Here's an example for sending emails via SMTP:

MAIL_MAILER=smtp
MAIL_HOST=smtp.example.com
MAIL_PORT=587
MAIL_USERNAME=your_email@example.com
MAIL_PASSWORD=your_email_password
MAIL_ENCRYPTION=tls

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published