Illuminate\Support\Collection::get(), 0 passed

Posted 5 months ago by splendidkeen

I am receiving a logical Too few arguments to function error, when trying to get() users within my script. Logic, because the users table has no records.

 var users = {!! $user->get()->keyBy('id')->toJson() !!};

How can I implement a logic, like optional() within the var above?

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