Re: Override default pluralization

midnightmonster | 3 years ago | parent

For a model class you can use the !Table annotation to specify the name of the table. E.g.:

!Table Entries

And then if something else HasMany entries, you can do

!HasMany entries, Class: Entry

...and I think that's all the places it would be used in plural?



florian | 3 years ago

Thank for your reply.

I made the changes you suggested. But now in the view where i call the $user->entries() method, I get the following error: "Entrie has not been imported.".
I guess the reason is, recess uses the toSingular() method on 'entries' to get the model name, which results in 'Entrie'.

Any suggestions?
Thanks!

reply



Welcome KrisJordan!

Web: http://www.krisjordan.com/

Location: North Carolina

Edit Profile