I'm a beginner with Laravel 5.4 but I'm stuck at some point. Please tell me how can I return two variables from one function / method to the same view. I've googled but all the contents are so old!!!
Here is my controller
public function index(Request $fetch){
$category = Category::all();
$fetch_cat = Category::find($fetch)->first();
//$data = array('category' => $category, 'fetch_cat'=> $fetch_cat);
return view('admin/create-menu', compact('data'));
}
I know I need to edit only this function and then in view I'll handle them.