How to create a new function in resource controller in Laravel?

Posted 1 year ago by AbdulBazith

I am having a resource controller Purchase_detailsContoller. My doubt is how can I create a new function in this controller other then default functions (create, index, edit, store, show, and destroy).

Here is my config route file ,

Route::resource('Purchase_details','Purchase_detailsController');

What should I do to add a new function in Purchase_detailsContoller. In route file what should I do?

Say for example if I need to add a function public open(). Then what should I do?

Please sign in or create an account to participate in this conversation.