7nohe / laravel-typegen

The library lets you generate TypeScript types from your Laravel code
79 stars 5 forks source link

The system cannot find the path specified. - Laravel Model #33

Open anburocky3 opened 5 months ago

anburocky3 commented 5 months ago

image

// app/Models/BasicInformation.php
class BasicInformation extends Model
{
    use SoftDeletes, HasFactory;

    protected $fillable = [
        'name',
        'gender',
        'dob',
        'marital_status',
        'profile_bio',
        'user_id',
        'children',
        'children_living_status',
        'profile_created_by',
    ];

    protected $casts = [
        'dob' => 'datetime',
    ];

    public function user(): BelongsTo
    {
        return $this->belongsTo(User::class);
    }
}

but it can't able to generate the types.

7nohe commented 5 months ago

@anburocky3 Is there a public repository of the reproducible project? Additionally, it would be helpful if you could provide detailed information about the runtime environment. I have only tested it on a Mac, so it might fail on other environments like Windows. If I have more detailed information, I might be able to make the necessary fixes.

7nohe commented 5 months ago

Basically, it should work fine as long as it's running inside a Linux-based Docker container.

anburocky3 commented 5 months ago

Basically, it should work fine as long as it's running inside a Linux-based Docker container.

I'm running laravel project inside laragon. Not using docker for now.