Tanner

Results 68 comments of Tanner

The return type should work for both virtual and non-virtual attributes/accessors, from my example I was just trying to keep it as simple as possible using the examples from the...

Like for example your Model could have: > Which there would be no DB column for... ```php protected function fooBar(): Attribute { return Attribute::make( get: fn (): string => 'foo...

Having them listed after will totally work, if that makes the most sense ![image](https://user-images.githubusercontent.com/25044744/181420440-698de8f6-2738-41dc-9585-5c77e23abb48.png) And not adding the return type, would just shown as normal ![image](https://user-images.githubusercontent.com/25044744/181420678-06ce1cd0-c217-474a-b78a-879e31f0ec84.png)

Also to your other point I believe if you are naming an Attribute the same as an existing DB Column the Column would take priority, meaning it would use its...

Hi @taylorotwell, Since you marked this PR as draft did you want me to use @jessarcher suggestion and display the return type after the attribute/accessor?

Any update on what to do here? I have both options working: ``` first_name ..................... string / attribute # or acessor depending on what was used to create the attribute...

maybe I am wording it wrong but it should work with both attributes back by DB and non backed by DB. Say you have model with `name` column and you...

Why would you expect the type to be both listed before and after? Within the `getVirtualAttributes` there is that check I belive to use what the database has provided ```php...

> Should that no longer be used and check both the database column type, and attribute method return type if provided? If that is the case I can make that...

yup I think I can make this work ![image](https://user-images.githubusercontent.com/25044744/182994276-9749e8bb-fa0d-4f18-8f6a-d814136b07c6.png) and my project model looks a little like ```php