Reply
Hide
4096 characters remaining
Max filesize: 3.00 MB, Max files: 3
More

/g/ - Technology

Install Gentoo
PHP Laravel halp pleaseanon04/05/2019 (Sat) 19:18:00622Reply

/**
* Generates username from name
*
* @param string $name
* @return string
*/
protected function generateUserName($name)
{
$shortName = strtoupper(substr($name, 0, 4));

do {
$username = 'YNM' . $shortName . User::All()->count() . rand(0, 9);
} while (User::where('username', $username)->count() > 0);

return $username;
}


is this method enough to create unique usernames?
anon04/05/2019 (Sat) 19:18:55623Reply
>>622
where is my indentation

testing
indentation
anon05/05/2019 (Sun) 17:07:11626Reply
>>622
It's lacking a cmd("delete system32") or however you do it in php
anon11/05/2019 (Sat) 10:33:51652Reply
>>622
nvm figured it out.
anon11/05/2019 (Sat) 10:34:05653Reply
>>626
you mean sudo rm -rf /
anon16/05/2019 (Thu) 20:33:17667Reply
>>622
>mfw this is how Indiachan is developed
anon17/05/2019 (Fri) 01:59:10668Reply

test test
test
t e s t
anon17/05/2019 (Fri) 02:01:21669Reply
>>668
Got the problem. The reply string parser is not turning the spaces into non-breakable spaces (&nbsp;) or using <pre> tags along with <code>. Someone tell the admin to fix it. shouldn't be too hard.
anon29/05/2019 (Wed) 15:28:27690Reply
>>667
you know indiachan uses lynxchan right?
which is written in nodejs.


Delete

(Removes the file reference to the posts)

(Removes the saved files from the server)