Team-Tea-Time / laravel-forum

A slim, lean forum package designed for quick and easy integration in Laravel projects
https://laravel-forum.teamteatime.net/
MIT License
601 stars 165 forks source link

Customization in controllers. #349

Closed vermarohitrk1 closed 1 year ago

vermarohitrk1 commented 1 year ago

Hi there,

I have a question regarding customizing the backend. I'm interested in adding tags and making other customizations. Is it possible to achieve this level of customization? I appreciate any guidance or suggestions you can provide.

Thank you!

Riari commented 1 year ago

Hi!

For implementing a new feature such as tagging, the most direct approach would be to implement your own models/routes/controllers and override the forum views to expose the functionality.

Using your example of tags, you could:

It gets more complicated if you want to extend or modify an existing package feature because the package controllers aren't designed to be modified (this helps a lot with maintaining backwards compatibility when I do new releases). That said, you can do quite a lot with events - these allow you to execute custom logic in response to any BREAD/CRUD action.

I hope that's useful! If you run into any specific difficulties while customising anything, feel free to comment here again and I'll do my best to help out.

Thanks