Any guidelines for Laravel Application approval on CodeCanyon ?

  1. Laravel Coding Standards
    Following best practices ensures maintainable, secure, and scalable applications.

a. Project Structure & Naming Conventions
Follow PSR-4 Autoloading standards.

Use camelCase for variables ($userProfile).

Use PascalCase for classes (UserController).

Use snake_case for database columns (created_at).

b. Controllers & Routes
Follow RESTful principles for API development.

Avoid writing business logic in controllers—use Service Classes.

Keep routes clean and group related routes in routes/web.php or routes/api.php.

c. Models & Database
Use Eloquent ORM for database interactions.

Define relationships in models (hasOne, hasMany).

Always use migrations for database schema changes.

d. Security & Validation
Use Laravel Validation ($request->validate()).

Protect routes using middleware (auth, verified).

Use CSRF protection (@csrf in forms).

e. Caching & Performance
Use caching (Redis, Memcached) for faster response times.

Optimize queries using Eager Loading (with()).

  1. Envato Guidelines for Laravel Applications
    If you’re submitting to Envato (CodeCanyon), follow these:

a. Code Quality
Follow Laravel’s coding standards.

Avoid unnecessary or duplicate code.

b. File Structure
Keep separate folders for controllers, models, and views.

Include a config file for easy customization.

c. Documentation
Provide a README.md file with installation and setup instructions.

Include a changelog for updates.

d. Licensing & Compliance
Do not use unlicensed third-party assets (themes, images).

Provide correct author attribution for open-source libraries.

e. Security & Performance
Avoid hardcoded credentials (.env for sensitive data).

Implement SEO-friendly URLs.

  1. General Rules for Laravel Applications
    Use Laravel Debugbar for performance monitoring.

Follow SOLID principles for maintainable code.

Always use Laravel Queues for background tasks.

Write unit tests for critical functionalities.

Thank your for your valuable guidelines , any other author say something here messing . please provide your guidelines . Thank you

If you don’t have a good idea and design, it will be still rejected.

2 Likes

thank you

Here is the most important rule to get approved in Laravel script category:

Outputting unescaped data is a potential XSS risk. You should only output data that you expect, or need.

For example, with Laravel and Blade, you can use this package: GitHub - mewebstudio/Purifier: HTMLPurifier for Laravel 5/6/7/8/9/10/11 which allows you to pass an array of allowed HTML, thus creating a whitelist, preventing unexpected data from being output.

For more information on XSS: Cross Site Scripting Prevention - OWASP Cheat Sheet Series