afoysal
1 month ago
160
1
Laravel

Fetch null values in Laravel Query

Posted 1 month ago by afoysal

In my Laravel application if I use below query I am getting all values including null values.

    Address::query();

But if I use below Query I am getting values from first_name starts with certain character and other columns value is not null.

    Address::where('first_name', 'LIKE', $request->letter.'%')->get();

I would like to fetch values from first_name column starts with certain character and other columns value is null or not null both.

Thanks

Please sign in or create an account to participate in this conversation.