Monthly Archives: February 2018

Laravel: Minify HTML

Assalamualiakum / Hi, Just a quick blog post this time. As part of optimisation, it’s important to minify your JavaScript & CSS – this can be done with Laravel Mix. But how about HTML? Seen this? So that’s how it’s look like our generated HTML codes. And how we going to change into this? A… Read More »

Laravel: Custom Accept API Header

Assalamualaikum / Hi, It’s been a while since I stumble upon an API, which have custom Accept header. For a past few days, I have a chance to implement custom header on one of my client project. Here is how I did – create a middleware to filter the coming request. As you can see… Read More »

Laravel: Datatable

Assalamualaikum / Hi, Today I will share how to use Datatables in your Laravel project. I will cover on: Setting up Datatables Compiling Datatables Asset with Laravel Mix Create route for Datatables Create reusable Blade Template for Datatable Part 1: Installation Create a new laravel project. Install package.json dependencies with npm install or yarn install.… Read More »

PHP-CS-Fixer Configuration

Assalamualaikum / Hi, Today, just a quick sharing on my PHP-CS-Fixer setup in my Laravel application. First, you need PHP CS Fixer. You can go through the installation steps here. Then, I’ve added an alias for my PHP-CS-Fixer alias csfix=”php-cs-fixer fix”. Now my PHP-CS-Fixer config file, following are the setup in my Laravel application. Once… Read More »