i’m connect multiple Database and i use Laravel Excel I can’n export. This is error “Database [mysql] not configured.”

i’m connect multiple Database and i use Laravel Excel I can’n export. This is error “Database [mysql] not configured.” i’m use laravel 6.0 and phpmyadmin version 4.4.15.10 controller public function exportExcel() { return Excel::download(new merakiExport, ‘MerakiBluetooth.xlsx’); } app/Exports namespace App\Exports; use App\MerakiBluetoothTemp; use Maatwebsite\Excel\Concerns\FromCollection; class merakiExport implements FromCollection { /** * @return \Illuminate\Support\Collection */ public…

Upgraded to laravel 6.0 – working migration now fails because of “default” method, might be a MariaDB problem

I was wondering if I should open an issue on Laravel github, but I’m not sure it’s a Laravel problem, maybe an Eloquent or MariaDB. The problem I upgraded recently to Laravel 6.0. When I try to reinstall my project (with empty database), and executing php artisan migrate, the first migration fails. The file contains…

Laravel eloquent merge two results and sort

I have found tons of posts about this issue and yet no solution work. Maybe its because of my laravel version. Its 5.7. I have two results, which look like this: result_a = DB::connection(‘mysql_live’)->table(‘user_chatmessages’) ->where(‘from_user’, $data->chat_from_user)->get(); $result_b = DB::connection(‘mysql_live’)->table(‘user_chatmessages’) ->where(‘to_user’, $data->chat_from_user)->get(); Now I merge them, which works great: $merged = $result_a->merge($result_b); $result = $merged->values()->sortByDesc(‘date_added’); The…

Only variables should be passed by reference – Laravel 5

When I did return asort(array_count_values(Visitor::all()->pluck(‘device’)->toArray())); I kept getting Only variables should be passed by reference This is an array array_count_values(Visitor::all()->pluck(‘device’)->toArray()) It returns { iPhone: 202, Windows NT 6.1: 2428, Windows NT 10.0: 2588, Macintosh: 1397, iPad: 12, Windows NT 6.2: 50, Windows NT 6.3: 90, X11: 442, compatible: 1813, Windows NT 5.1: 97, Linux: 227,…