itainathaniel

Experience

29,160

1 Best Reply Awards

  • Member Since 3 Years Ago
  • 547 Lessons Completed
  • 15 Favorites

23rd January, 2016

itainathaniel left a reply on Laravel Collection Returns An INT As String Locally And On Live Environment As An Int ! • 2 years ago

OK, got it: It's a MySQL issue (when using PHP+PDO), one needs to switch mysql to mysqlnd: http://stackoverflow.com/a/20123337/1824374

24th September, 2015

itainathaniel left a reply on Onboarding With Email Only • 2 years ago

The first thing on my mind is forward the email to the Auth with a username and password based on the email, send the email to the user and let it update the details afterwards.

itainathaniel left a reply on Auth Login State Not Persisting • 2 years ago

Hey, I think that when working with social authentication use need to login the user using Auth::login(User $user); or Auth::loginUsingId(1); in order for it to work.

itainathaniel started a new conversation Achievement System With RT Feedback • 2 years ago

Hi,

I'm trying to build an achievement system (some sort of badge system) for my site - some sort of questions-answers site. The achievement (or the badge) can be obtained by many parameters, some of which are related to the user's previous action (e.g. the user answered this questions the fastest of all users, this is the fastest time the user answered a question, 8 straight correct answers and such. Plus I can only earn one achievement at a time.

The best thing I could come up with is having a feedback function with a loop:

$feedbacks = [
    CheckFeedback1::class,
    CheckFeedback2::class,
    CheckFeedback3::class,
    etc...
];

foreach ($feedbacks as $fb) {
    if ((new $fb)->allowed($question, $answer)) {
        return (new $fb)->text();
    }
}

Any ideas to improve this?

Edit Your Profile
Update

Want to change your profile photo? We pull from gravatar.com.