Support the ongoing development of Laravel.io →
Requests Views Blade
Last updated 1 year ago.
0

Assuming you are using controllers you can do something like

$data = [];
$data['objectOne'] = $objectOne;
$data['objectTwo'] = $objectTwo;
return view('view', $data);
0

Or you can use

return view('view', compact('objectOne','objectTwo'));

Which will make variables $objectOne & $objectTwo available in your view.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

qyqyqy03 qyqyqy03 Joined 14 Aug 2016

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.