pass data in view from controller codeignitor code example
Example 1: how to store value in array in controller and pass to view
return view('hello')->with(['key' => 'value']);
Example 2: how to store value in array in controller and pass to view
<p>{{ $key }}</p>