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.
- PHP 7.* or 8.*
- Composer
- MySQL database
- Laravel 8 (or compatible version)
-
Clone the repository:
git clone https://github.com/musman2002/SubscriptionPlatform.git
-
Change to the project directory:
cd SubscriptionPlatform
-
Install composer dependencies:
composer install
-
Copy the
.env.example
file to.env
and configure your database and email settings. -
Generate the application key:
php artisan key:generate
-
Run the database migrations:
php artisan migrate
-
Start the Laravel development server:
php artisan serve
-
Visit the application in your browser at
http://localhost:8000
.
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
POST /api/websites/posts
- Create a post for a specific website.POST /api/websites/subscribe
- Subscribe to a website.
To explore and test the available APIs, import the Postman collection from the following link: Postman Collection
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
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
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