Skip to content

NEW TEMPLATE: 🐘 PHP Laravel Framework Support #66

Description

@DimitrijeGlibic

Summary

Add PHP Laravel framework support to Scafoldr's code generation system, enabling users to generate Laravel applications from DBML schemas.

Requirements

Backend (Core):

  • Create Laravel template in core/templates/php_laravel/
  • Add scafoldr_template_config.json with PHP/Laravel mappings
  • Implement Eloquent model generation from DBML
  • Generate Laravel controllers, routes, and middleware
  • Add Laravel-specific type mappings (string, integer, timestamp, etc.)

Frontend:

  • Update framework factory mapping: "php-laravel": "php_laravel"
  • Remove comingSoon: true from framework selector
  • Update generation message to show "PHP Laravel" instead of hardcoded text

Technical Details

Type Mappings (SQL → Laravel):

  • varchar → string
  • int → integer
  • timestamp → timestamp
  • text → text
  • boolean → boolean

Generated Components:

  • Eloquent models with relationships
  • API resource controllers
  • Form request validation
  • Database migrations
  • API routes with proper RESTful structure

Acceptance Criteria

  • DBML schema generates working Laravel application
  • Eloquent models include proper relationships (hasMany, belongsTo, etc.)
  • Generated controllers follow Laravel conventions
  • Database migrations are properly structured
  • Application runs with php artisan serve
  • All CRUD operations work through generated API routes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions