devtips1's profile picture. Just a developer that's tweeting tips that i learn in the ordinary days.

devtips

@devtips1

Just a developer that's tweeting tips that i learn in the ordinary days.

#php #tips Changing value of item in array When you run a loop in a foreach, you can change the array value by adding "&" character. For sample: foreach($data as $key => &$value) { $value = 'new value'; } Ready, you gonna have a new value.


#js #tips Convert numbers to binary If you want to convert some number to binary in JavaScript, you can use the function toString() passing the number 2 as param*:* (10).toString(2) -- Result: 1010 Try yourself


#laravel #lumen Observe rule in Lumen When we use observer for track actions in the parent model, we can't receive any another param else the parent model. If you have some param that doesn't belong to the parent model, you should implement the method in the equivalent service.


This account does not follow anyone

United States Trends

Loading...

Something went wrong.


Something went wrong.