how to return row number in json resource laravel lumen code example
Example 1: group by laravel
$user_info = DB::table('usermetas')
->select('browser', DB::raw('count(*) as total'))
->groupBy('browser')
->get();
Example 2: laravel query json
$users = DB::table('users')
->whereJsonContains('options->languages', ['en', 'de'])
->get();