Charts Tip #1

Text Rotation A simple tip if you want to rotate text in x or y axis in google charts. In this example I am rotating horizontal axis text to 65 degrees. The reason why I am doing this is to create more space for labels and also easier to read. hAxis: { textStyle: { fontSize: […]

Laravel Tips #4

Last Login event registration Today I worked on my application to record last login date and time for the users. After reading this documentation this is how I implemented in my project. protected $listen = [ ‘Illuminate\Auth\Events\Login’ => [ ‘App\Listeners\LogLastLogin’, ], ]; Then ran the artisan command php artisan event:generate This artisan command generate events and […]

Windows Lumia 950 XL

Finally hubby bought his new phone couple of weeks ago. After months of research he finally settled with Windows Lumia 950 XL.  It took a while to be available in New Zealand maybe because the market is very small or some other strategy but I must say some genuine windows fans also live another side of […]

Laravel Tips #3

Using Hashid with Laravel 5 Hashid can be used to to obfuscate id for the url of the web pages. Sometimes we want to prevent the id display for security reasons. Tonight I was working on it so thought to share my experience. Hashid is a php open-source library which generates ids like  Youtube ids where the numeric id […]

Laravel Tips #2

Closed-based routes vs Controller Closure function – allows to skip the controllers and perform business logic and generate views. Helps to prototype applications quickly or ideal for testing purpose. As the application grows closed-based routes will become very complex and confusing. Route::get(‘cats/{cat}/edit’, function(Furbook\Cat $cat) { return view(‘cats.edit’)->with(‘cat’, $cat); }); Controller – loads a dedicated class […]

CSS Tips #1

Disable link with CSS. If you want to disable the link from clicking than this simple CSS will do the trick rather than writing a javascript. <a href=”link.html” class=”not-active”>Link</a> .not-active { pointer-events: none; cursor: default; }

Urgent vs. Important

This morning I was reading this great article. Thought to share some of my views on this topic. “What is important is seldom urgent and what is urgent is seldom important.” — Dwight D. Eisenhower Applying this concept into real business world, when the tasks becomes urgent the company uses all its resources to complete that task […]

JQuery Tips #1

.wrap() vs wrapAll() Simply wrap HTML around an element. The wrapAll() method will wrap all the elements matched into another element whereas the .wrap() method which wraps the matched elements individually. The example wraps an img tag with anchor. $j(“img#tooltip”).wrap(‘<a href=”#” id=”show_tooltip”/>’); Adding a row in the middle of the table If you want to add an additional […]

Laravel Tips #1

Helper function – array_add() (laravel 5.2): link The method appends the key/value pair  to the existing array.  This can be useful when adding additional fields when creating new record with request all() method. If the form and database field names are same than just pass the request->all() method. If you still see that the input is not creating […]

Amazon Business Model

As we all know that Amazon is one of the leading eCommerce business model where they think like technology company and agile methodology. This article shows the seven things to know about Amazon business model. Vision    Growth versus profit – focused more towards growth and innovation than making profit. Thinking about the future than present. Size […]