Laravel SVG directive

I was working on a site and uses Steve Schoger‘s Heroicons. The Heroicons are svg based and it works best with SVG using HTML inline.

I wrote a custom blade directive so that I can include the inline SVG easily with blade directive.

When I need to use a Heroicons svg, I just need to call it with


given that the svg file is already copied into public/svg directory.


Bad Blood

I simply amazed how insane the CEO of Theranos, Elizabeth Holmes, when she was running the company.

The FOMO (Feare of Missing Out) culture and the fake it until you make it mentality made this possible.

Instead of choosing to condemn the multiple people in the faults, I want to praise the people who bought this crime into light, namely, Tyler Schulz, Erika Cheung, Gary Betz, Gary Yamamoto, and John Carreyrou.

Laravel Resourceful Route Without Prefix

The resource controller contain a method for each of the available resource operations.

For example:

Route::resource('photos', 'PhotoController');

is handle by the verbs in the controller. such as


If you want the resource without the name, you can do

Route::resource('/', 'PhotoController');

but the parameters will not work properly since the route will become


in order to “fix” that, you can do

Route::resource('/', 'PhotoController')->parameters([
  '' => 'photo',

so the route now is


The Fifth Risk

I reenforce my perspective on the following two items after reading this book.

  1. Whoever yell the loudest or appear the most glamorous do not necessary translate to value.
  2. We cannot and should not privatize the government services.

Laravel Socialite and Google

Google announced their plan to shutdown Google+ by March 2019. Along with the Google+ platform, the Google+ API will be depreciated too.

On Laravel Socialite, it used to use Google+ to authenticate, but it no longer uses Google+ platform.

If you are using Socialite 4.x, your project in the Google Cloud Platform no longer needs to enable Google+ API since the default scope is already selected for authentication needs.

That’s all you need to use Google OAuth with Laravel Socialite