pass data in view codeigniter 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>