Is there a method to select a first row cell in Laravel's query builder? Im looking for something like this:
$my_value = DB::table("my_table")
->select("value")
->where("key", "=", "my_key")
->getFirstRowCellValueOnly()
Yea, I could do it by selecting first row and then just selecting key "value" from returned array (->first()["value"]
), but a default method would be more tidier ^ ^.