Define global variables in laravel

Define global variables in laravel

Imagine you want to define some variables that can be accessed from anywhere in your laravel project. To achieve that, the best way will be to take advantage of laravel’s configuration file. Creating a Configuration File First, you need to create a file inside...
Add watermark in Chart.js

Add watermark in Chart.js

Today I’m going to share another snippet for Chart.js, that you can use to put a watermark image or logo in charts. To do that, I’ll create a small plugin. I’ll register the plugin globally to apply it on all charts. Though, you can apply it on chart...
Add watermark in Chart.js

Show Chart.js chart as image

I was working on a tool where I needed to show Chart.js chart as image. I’m going to share a snippet to show I achieved it. Chart.js have an afterRender() callback function which is called after a chart has been completely rendered, including the animation....