Skip to main content
When user submits a product, it will be listed here for admin to review and approve.

Features

  • View all products submitted by users
  • Approve or reject products
  • View product details
  • Edit product details
  • Delete product

Initial Setup

For initial setup, change the products info in database/seeders/ProductSeeder.php file and run the seeder command to add to the database.
database/seeders/ProductSeeder.php
All the products added by admin will be automatically displayed in the products page.

Submitting Products from User

Once user subscribes to the plans, they can submit their products from the dashboard. There are pre-defined plans for users, subscription per product or one-time payment per product. Details about Plans can be found in the Plans page.

Approving Products

When user submits a product, it will be listed as draft. Admin will receive a notification via email about the new product submission. Admin can view the product details and approve or reject the product.
To enable email notifications, configure the mail settings in the .env file and add [email protected] to the .env file.
After approval, product will be listed in the products page.

Products that will be displayed

Only the products that has been added by admin, or approved and paid will be displayed in the products page. That part is controlled with subscribed and ordered scopes from the Product model and used in the Products livewire component.
app/Models/Product.php
app/Livewire/Products.php
When user don’t make payment for product, it will be listed as draft. User can click “Submit for Moderation” button, after which will be redirected to the payment page. “Submit for Moderation” route is protected with middleware. For one-time payment use \App\Http\Middleware\HasOrderForProduct::class and for subscription use \App\Http\Middleware\HasSubscriptionForProduct::class middleware.
routes/web.php