Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating a module using php artisan twill:make:module and selecting no traits creates a malformed model #2731

Open
phyce opened this issue Feb 23, 2025 · 0 comments

Comments

@phyce
Copy link

phyce commented Feb 23, 2025

Description

When using the interactive prompt and choosing all options as no (0), we get a malformed Model with an empty array "[]" in the place where traits would be added.

Steps to reproduce

php artisan twill:make:module Test
and pressing 0 for all prompts

Expected result

<?php

namespace App\Models;


use A17\Twill\Models\Model;

class Test extends Model 
{
    protected $fillable = [
        'published',
        'title',
        'description',
    ];
    
}

Actual result

<?php

namespace App\Models;


use A17\Twill\Models\Model;

class Test extends Model 
{
    []

    protected $fillable = [
        'published',
        'title',
        'description',
    ];
    
}

Versions

Twill 3.4.1
Laravel 11.41.3
PHP 8.2.27
MariaDB 11.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant