Laravel

These posts are all related to Laravel.

February 24, 2021

Convert datetime string to carbon instance with laravel eloquent

Recently I was working on a project, where after querying the database via eloquent I get back a datetime string. I wanted to convert it in to timestamp. To my surprise, converting default...

Read

February 24, 2021

PHP is not dead

Today, I was listening to Jeffrey's podcast. He was talking about React, who wants to sit at cool kids table. There is a lot of fuss about React. Newbie like me would think, oh yes it is used by so...

Read

February 11, 2021

Laravel 8 - Retrieve one or two columns from Model

Often times when you are retrieving data from eloquent model, you just need some columns and not all of them. When using Laravel eloquent model to query database, Laravel will return a collection...

Read

Sign up for monthly newsletter