chat widget which runs on every html website

we need a chat script which will embed chatbox to html. We are going to fire event on our server to store the messages.In chat script we need our custom event to work, i mean we can extend the script functionality and write our custom functions. We are going to make request laravel server., php live chat will work but it can’t be configured with laravel.

We don’t need fully pre canned script, we need to extent its functionality and write javascript code in it

If you plan to add a lot and hack it to what you need then would it not make more sense to build it from scratch yourself exactly as you need it?