Support the ongoing development of Laravel.io →
Database Eloquent
Last updated 2 years ago.
0

I'd guess it's the where() clause. The second parameter is actually the comparison operator, not the value to compare against.

Try this:

$profile = DB::table('profiles')->where('uid', '=', $uid)->first();

echo is_null($profile);
Last updated 2 years ago.
0
$query = DB::getQueryLog();
                return Response::json(array(
                        'error' => true,
                        'message' => $e->getMessage(),
                        'trace' => $e->getTrace(),
                        'sql' => $query
                    ),
                    200
                );
Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

bonty233 bonty233 Joined 16 May 2014

Moderators

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.