modeltyper icon indicating copy to clipboard operation
modeltyper copied to clipboard

Generate TypeScript interfaces from Laravel Models

Results 14 modeltyper issues
Sort by recently updated
recently updated
newest added

### What happened? ## The Problem I specified a "clickhouse" connection for one of my models using the [laravel clickhouse db driver](https://github.com/glushkovds/phpclickhouse-laravel). Now whenever I run the `model:typer` command, it...

bug
Stale

- [ ] all "or null" need to be undefined - [ ] dates need to be strings

Stale

```ts export interface RoleResults extends Omit { data: Role[] } ```

enhancement
Stale

For instance, in User model ``` protected $casts = [ 'database_roles' => AsEnumCollection::class.':'.DatabaseRole::class, ] ``` Here is the error when running the model:typer tool. `Class "Illuminate\Database\Eloquent\Casts\AsEnumCollection:App\Enums\DatabaseRole" does not exist` It's...

bug
Stale

Hi there, This is a great package, and thank you so much for putting it together. I wanted to throw out an idea for feedback and see if it's something...

Stale

### What happened? When running `vendor/bin/sail artisan model:typer --plurals --api-resources` modeltyper return this error: ```bash Exception Accessor method for parent_id on model App\Modules\ProductCatalog\Models\Category does not exist at vendor/fumeapp/modeltyper/src/Actions/DetermineAccessorType.php:38 34▕ return...

bug
Stale

### What happened? I read that starting support is from Laravel version 9.21. I was on 8 so had to upgrade my project anyway, so I did. I'm currently at...

bug
Stale

When using only casts it generates the types perfectly. But when we try to define an accessor then it looses the type ```php namespace App\Models; use App\Enums\PostType; use Illuminate\Database\Eloquent\Casts\Attribute; use...

Stale

What do you think about a feature that includes relation properties for the `withCount()` and `withExists()` Laravel methods? Such a feature would generate a Typescript definition like this: ```ts export...

Stale

closes #95 Not sure if I want to actually go as far as the example install autoloader (though I think it is necessary).

Stale