Support the ongoing development of Laravel.io →

resmall

Joined 24 Aug 2015

Statistics

Threads 2
Replies 3
Solutions 0
Articles 0

Query builder returns a Collection when empty and an array when it's not

How can I validate it? If I use: $res = DB::table('estacaohs') ->whereRaw($sql) -...

0 Likes
1 Replies

Tell Eloquent to return an array using a column value as key

Hello all! Currently I have an application where I have stored in the database the following columns...

0 Likes
3 Replies
Solved
replied 9 years ago

Getting a laravel form to use ajax

Taking your routes.php, this is what you should have in your controller HomeController. class HomeCo...

0 Likes
replied 9 years ago

Getting a laravel form to use ajax

How is your "routes.php" file setup? Can you post it? Mind that you are sending a POST req...

0 Likes
replied 9 years ago

Tell Eloquent to return an array using a column value as key

arjan said: You can do: Icon::all()->keyBy('name') or Icon::all()->keyBy('name')->toArray...

0 Likes

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.