Tag Archives: laravel

Laravel: Write Class Generator Command

Assalamualaikum, In this post, I will share with you how you can create your own class generator – like php artisan make:model …. So here the trick, in order to create your own class generator command, you can extend the use Illuminate\Console\GeneratorCommand. For instance, you want to create make:service. First, create new artisan command by… Read More »

Laravel: Adaptive Attendance

Assalamualaikum, Recently I’ve attended a local event on launching IT products called JomLaunch. But I’m not gonna go details about it – however you can checkout projects submitted in their website and other projects not presented but worthy to mention – I did submit project (Open Payroll). To keep long story short, I met Akif… Read More »

Laravel: Creating Your Own Helpers

Assalamualaikum / Hi, Helpers in Laravel, help you a lot in day-to-day coding with Laravel. But, what if you want to create your helper? and of course, you want to organise it as well. Usually I have my own helpers – see my helpers in Laravel Boilerplate. But before doing that, you need to add… Read More »

Laravel: Display Progress Bar in Seeder

Assalamualaikum / Hi, Recent projects development require me to have numbers of seeders – this include some dummy data. Each time seeding new / old data, it’s kinda boring to wait it’s done. So I just need to know, how much the progress of the seeding. Following is the trait I’ve created to generate the… Read More »

Laravel: HasDatatable Trait

Assalamualaikum, Just a simple setup on datatable – to have a trait that can be use for other models. Assumed that you already install Yajra Datatable, we going to setup the API end point, simplify the setup of datatable. Here the trait: You can use the protected $datatable property to select which fields to display… Read More »

Laravel: Observer Setup Enhancement

Assalamualaikum, It’s been awhile since my last blog post. Today, just want to share something simple, an enhancement of LARAVEL: CREATE HASHED ID FOR A RESOURCE USING OBSERVER. Going to refactor a bit. First, let’s modify the app/Observers/Kernel.php, to be like the following: Next, add new config file for our observer – config/observers.php: And that’s… 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 »