Isak Berglind

Isak Berglind

Posts about Php

October 4, 2020

Change uploaded filenames in the trix editor in nova

Last week I noticed that some of our image that got uploaded from the trix editor in Nova to S3 was containing non url-safe characters. No big deal i thought, there must be an easy way to 'sluggify'...

Read

February 10, 2019

Logical or || in php vs javascript

Comming from php, I noticed something in javascript that I found pretty wierd - how the the logical or operator || behaves. In php, the expressions on boths sides of the or operator is being casted...

Read

May 31, 2018

Differentiate Laravel collection methods

Laravel collections is one of my favorite features of Laravel. I use them about every time I need to loop through something or deal with arrays. Some methods are quite similar to each other, though,...

Read

April 23, 2018

?? vs ?: vs || in php

Have you ever been confused about what exactly these operators do? I know I’ve been, so I spent a little time to look it up. It turns out it’s quite simple really, but while i did my research, I...

Read

April 23, 2018

Translate content on the front end

A multilingual site comes with a few more challenges than a normal single language site. One of those challenges is how to provide the translated strings to your frontend framework. How to approach...

Read

September 26, 2017

External api routes in laravel

Almost all of the apps i write nowadays are communicating with an external API of some sort. It can be an API i wrote myself, or some service used to get or post data. Some of these services provides...

Read