Relative Content

Tag Archive for phpmysqllaravel

Laravel get latest model for each model and group count totals

I’m trying to show a count for each subscription status for my client model in my Laravel project. A client can have many subscription status entries, but I only care about the newest entry of each. my relationship cientSubscriptionStatusLatest takes care of this. There are many statuses.

Laravel : Get data from query order by asc

I need records in specific order.
Order should be asc and not include null data in order.

This one is my query but its getting null record first after that i am getting my other record.