Browsed by
Category: Artisan

Laravel: Observer

Laravel: Observer

Assalamualaikum & Hi, Eloquent models fire several events, allowing you to hook into the following points in a model’s lifecycle: retrieved, creating, created, updating, updated, saving, saved, deleting, deleted, restoring, restored. Events allow you to easily execute code each time a specific model class is saved or updated in the database. Based on events above, we can capture all the events mentioned above either by setup in model’s property called $dispatchesEventsor we can setup an observer to capture all the…

Read More Read More

How to Use Lumen in Laravel

How to Use Lumen in Laravel

You love the speed of Lumen but you want to have the features of Laravel? No problem, just include Lumen inside Laravel! Below are the steps to include Lumen inside of the Laravel Please ensure to create an empty Laravel and Lumen project because you need to copy some files from Lumen to Laravel Here the working sample of the Lumen in Laravel – Lumen in Laravel

Laravel: How to Create Custom Artisan Command

Laravel: How to Create Custom Artisan Command

There’s only 3 steps required to setting up new Artisan command. 1. Step 1 – Create a new console file 2. Step 2 – Open up `app/Console/Commands/CommandName.php` and update the signature and the description property. 3. Step 3 – Register your new Artisan command in `app/Console/Kernel.php` Now you’re ready with your new artisan command. Check your command with `php artisan`. It should have something like this one. Here the a sample code. Reference Artisan

Training: Laravel – Batch 4

Training: Laravel – Batch 4

Registration Open Now! Please register at Laravel – Batch 4 Course Details Date: 16th & 17th April 2016 Location: http://bit.ly/cc-training-location Fee: RM 300 Syllabus Details Setup The Basic – Routing – Controllers – Views – Blade Templates Database – Migrations – Seeding Eloquent ORM – CRUD – Relationship Packages – User Management – Access Control List