Nikush Patel has created a nice little site with PhpStorm tips presented as gifs. Really nice and helpful!

Go learn some tips

Adam Wathan has released a package for outputting SVG’s on your site. It looks nice and might become a standard include in my projects.

Go read more at the Laravel News post.

Github reacts to Facebook, adds reactions

So I just read over at the Laravel News that Github has introduced reactions. The code-sharing, version-control, platform har added reactions to issues and pull-requests, where a lot most the discussions take place. Part of why Github has elected to add reactions is in part due to the “open-letter” by the community, and they wanted to address the problem that many people in fact “react” to issues, pr’s and so on with emoji. This creates a lot of clutter and noise, as the discussion thread is full av emoji and no content. Secondly they also wanted to let people express their feelings more effectively.

Github Reactions

Github Reactions

We’re adding Reactions to conversations today to help people express their feelings more simply and effectively. – Github

And sure, I get all this and it is a good move indeed. However, you saw that coming didn’t you 😉
However, the “reactions” they have chosen. I do really wonder if they’ve done as much research as Facebook did for which emoji, or reactions, they have chosen. Facebook wrote a long post on how, what and why they chose the ones they did. How did Github and up with thump up/down – laugh – confused – heart – hooray?

On the Github blog they do say that:

”We decided to choose reactions that are relevant to the conversations people have on GitHub. :+1::-1::smile::thinking_face::heart::tada: cover the range of reactions our users typically express through comments on GitHub. We’re looking forward to seeing how the GitHub community uses this set of reactions.”

But who says “hooray” for example, really?

And then there is the timing, are they really reacting to the “open-letter” or just copying Facebook.
Oh well, my ramblings, I do like the feature though – nice one octocats!

What’s your take on Github reactions?

Instant Logo Search – find logos and flags of the world

Now this could be a useful link to bookmark for the future!

Laravel password reset caused double password hashing

I recently updated a little weekend project of mine to Laravel 5.2 and started using the re-implemented authentication stuff.
What I hadn’t implemented, or activated, on the site was password resets. Password resets are a feature I myself sometimes use a lot, for different reasons and in this particular case I discovered a problem.

When you have a register/login system on your website the passwords should be encrypted, hashed, and so on. How and when this is done is specific to you and your system, one smooth place to add it is on the setPassword method of your User model. This ensures that whenever the password is written to the database it hashed, right.

But here is where the “problem” that arose when I activated the password-reset of Laravel (how have I not stumbled on this before?). So when you reset a password out-of-the-box you:

  • -> get an email with a link
  • -> go to reset page
  • -> post new password
  • -> password gets saved
  • -> you are logged in.

Nothing out of the ordinary.

The password gets hashed in the ResetPasswords trait before it is saved, which is all good except if you hash it in the setPassword method. Because now it gets hashed twice and when you try to login you’ll get an error because the passwords will not match. Well luckily there is a simple fix.
In your PasswordController, inside App\Http\Controllers\Auth, add your custom resetPassword method which will override the traits one.

For example:

protected function resetPassword($user, $password)
    $user->password = $password;



If you don’t do your hashing on the User models setPassword method your probably fine. Maybe doing it there is a weird place?
Let me know what you think.

All new heavy featured WordPress 4.4 released

”Don’t you mean feature heavy WordPress 4.4?”
No, actually I don’t. That is because I don’t think there are so many new features (i.e feature heavy) but the ones that came with 4.4 are pretty heavy 😉

Yeah, so WordPress 4.4 got released tonight (swedish time) and it come with som real nice features. The bigger ones are responsive images, embed everything and the long worked on WP-API is finally getting added to core. For now just the infrastructure has been added, but more is coming in upcoming releases. The embed everything means that you now easily can share posts on other WordPress sites with title, excerpt, featured image and can even get links for comments and sharing.

Enough from me, go read the official post on WordPress 4.4 “Clifford”.

OH! btw, this site here is already upgraded to 4.4!

PHP7 has arrived – Rejoice!

Now what does this all mean you ask?
Well if you haven’t heard or read much about PHP7 I can recommend these links to catch up. Has the changelog and an migration guide.
SitePoint: Find out what’s new with PHP7
Laracasts: Up & running with PHP7

Google Star Wars easter egg

A long time ago at google far, far away…

So as you know, Google does some funny stuff every now and then. Yes I’m talking about the easter egg, often on or YouTube and so on.

Well now it’s time again, so hurry up and:

  1. Go to
  2. Search for ”A long time ago in a galaxy far, far away”
  3. Press enter
  4. ENJOY!

Check out Matt Stauffers post on the upcoming Laravel Spark

Socialite providers

Providers for Laravel Socialite

A few weeks ago a write an article on how to get started with Laravels Socialite (swedish).
If you are using Socialite you might feel it is a bit light, with just Facebook, Github, Twitter and so on. Fortunately there are awesome people making these kinds of packages just so much better and more useful.

Without further ado, I give you Socialite Providers by DraperStudios. Socialite Providers give you 70+, as of writing,  additional providers for Socialite.