Monthly Archives: December 2017

Laravel: Package Generator

Assalamualaikum / Hi, It’s been a long time, I wan to update my Laravel Package Generator and now it’s officially updated with version 2.0.2. Lots of experience, study case, observation, setting up things in Laravel package. Now I believe, it’s ready to speed up your Laravel Package Development. So, what the Packager do? Basically it… Read More »

Laravel: Blueprint Macro

Next, the thing that I want to share is how I create Blueprint Macro. Similar to my previous posts on Response and Route. But this time, we going to add more functionality to Blueprint which used in migrations. Update your user migration file: Now your code will be much cleaner. Feel free to fork and… Read More »

Laravel: Route Macro

Here I want to show, how to extend existing route – get, post, etc. for your application. I’m going to create a new route Route::setting(‘module’), which will create all necessary route setup. Now register this new macro in your AppServiceProvider, in register() method. Then, you can start use the new route. To use this new… Read More »

Laravel: Response Macro

It’s quite straightforward to extend a class functionality with Macro. This time I show how to extend the Response class in Laravel. Create a class in app/Macros/Http called Response.php and add the content as following: Then register the Macro in AppServiceProvider Now you may test your new responses:

Laravel: MoneyPHP Wrapper and Helper

I’ve created a simple MoneyPHP wrapper to simplify my day to day work dealing with MoneyPHP. and a currency configuration – where you can specify the label for display use, and swift_code for MoneyPHP usage: And I’ve create a helper in my app/Support/helpers.php, to simplify the usage of the MoneyPHP Wrapper. A simple usage as… Read More »