Question and answer is powered by AnsPress.io
I am using blade template in laravel. Now, I want to access a controller function directly from the view page without accessing root. How can I do that?? Help me, please.
You mean you want to pass data from controller to view? if that is the case; after initializing the data you can use key/value pair like this
{ return view(‘page’,[’key’ => $data]) } or compact like { compact(‘data’)}