Nasrul Hazim Bin Mohamad

Get All Public Holidays for Malaysia States


Get All Public Holidays for Malaysia States. Source grab from Office Holidays

Reset Your Password from API


As you may know, Laravel provide a scaffold auth, which include reset/forgot password on web applications side. But what if you have a mobile application that need to reset password from the mobile application?

In this post, I’ll show you how to reset user’s password from an API in Laravel.

UPDATE 02/07/2017:

In case you’re looking for App\Transformers\Json, you basically can create a class called Json in app/Transformers directory.

In the Json class:


namespace App\Transformers;

class Json
    public static function response($data = null, $message = null)
        return [
            'data'    => $data,
            'message' => $message,

Please make sure to composer dumpautoload -o afterward.

Laravel Base64 Encoding Validation and Base64 Image Encoding Validation


Following are the simple validation checking on Base64 Encoding and Base64 Image Encoding: