im trying to pass paginate variable to my component , it goes null ! even if in the page where i call the component it isnt null , if i delete ->paginate(10) and send the data normal it will reach the component without any problems but with paginate , when i show it in the component using dd its "" (nothing on it)
#small problem (i guess)
1 messages · Page 1 of 1 (latest)
completely ignoring your question here to iron out some things (ocd has been triggerd)
- functions start with lowercase
- dont use a variable if you are only gonna return it anyway (just return the reservations, no need for
$data - with the correct relations defined your can do
auth()->user()->registrations()->with('packages')->paginate(10);
and usually controllers follow restfull ('show' instead of your function name)