-
Hi everyone, Example<?php
// ----- Now -----
/**
* Get the login username to be used by the controller.
*
* @return string
*/
public function username()
{
return 'email';
}
// ----- In Future -----
/**
* Get the login username to be used by the controller.
*/
public function username(): string
{
return 'email';
} And, of course, I'm willing to help in this work. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
I agree, any modern IDE will work a lot better with statically typed code sadly some of the top commiters to laravel/framework have not yet started to write typed code - I guess they are used to docblocks |
Beta Was this translation helpful? Give feedback.
-
@nunomaduro what are your thoughts on using (only) static types in Laravel/framework? I noticed a random recent commit of yours still used docblocks instead.. |
Beta Was this translation helpful? Give feedback.
-
This was added to Laravel 10 via #44545 |
Beta Was this translation helpful? Give feedback.
This was added to Laravel 10 via #44545