I am confuse as how to pass variable from controller to view. I know there is a lot about this already on stockoverflow but unable to find one that works, please point me in the right direction. Thank you.
CONTROLLER
class StoreController extends Controller
{
public function index()
{
$store = Store::all(); // got this from database model
return view('store', $store);
}
{
VIEW
// try a couple of differnt things nothing works
print_r($store);
print_r($store[0]->id);
print_r($id);