Dynamic Crosstab With Store Procedure

Let’s assume that we have table with data like this bellow :

Region

and we want to view data like this

Region2

for that we can write query like this

But, what we can do if the data going bigger and category added, e.g. 1995, 1996. Yes of course we can add

once again but, how if we have many category value which are similary. i think this is a waste, so ot will usefull if we write crosstab dynamicly. let’s check it out

the query above will transform all category value into column, wich distinct will prevent the redundance. just keep in mind and hope this helpfull.

 

The Usefull Simple : Javascript

The usefull Code that help you to write big code, there is it:

1. Remove property from the Object

let’s say we have object like this

then, we want to save this data to db, but we don’t need “_inserted_by” property there. To do that we can do something like bellow.

that simple, but helpfull.

 

Super Simple Laravel 5.x Layout

Create folder structure like this

laravel-view-structure
Laravel View Structure

On the layouts folder create main layout named it master.blade.php, and copy paste this code

On partials folder create new file named it header-media.blade.php, and copy paste this code

On partials folder create new file named it footer.blade.php, and copy paste this code

On modules/user folder create 2 files named it form.blade.php and index.blade.php

open file form.blade.php then copy this code

open file index.blade.php then copy this code

from your controller call the view like this

Ok, That’s its! Pretty simple right? See you in next tutorials.

Just Tracing Laravel Cashier

Hahhahahahaha.. What’s the point in this post??? But it’s very usefull for me.. and for you?

For client side you just add this code.. simple huuh?

Okeeyyyy, let’s me see behind that code! Trace… trace… and trace.. (how i can make a clean code like this!)
Read More