@RayC I need to use this $notification in header.blade which is common in all pages. So it not easy to write this function in each and every controller
Can you explain why you want to call a controller function from a view? I cannot think of a reason for this? Just send the data to the view from the controller, or use a component
@Sinnbeck I need to use this $notification in header.blade which is common in all pages. So it not easy to write this function in each and every controller