Skip to content

Instantly share code, notes, and snippets.

Avatar
🏹
align, declare, achieve

Shankar Ganesh psgganesh

🏹
align, declare, achieve
View GitHub Profile
@psgganesh
psgganesh / EloquentCheatSheet.md
Created Oct 14, 2020 — forked from avataru/EloquentCheatSheet.md
Eloquent relationships cheat sheet
View EloquentCheatSheet.md
View Dockerfile-cheat-sheet.md

Using Dockerfile

Instructions

  • FROM
  • COPY
View temp.php
<?php
use App\Models\Registration;
use App\Models\Subscription;
.
.
.
.
.
@psgganesh
psgganesh / music-transcript.vtt
Last active Mar 22, 2020
music-transcript.vtt
View music-transcript.vtt
WEBVTT
Kind: captions
Language: kn
1
00:00:23.104 --> 00:00:25.074
அவா முன்னலா நிகிரன்
2
00:00:25.080 --> 00:00:27.074
@psgganesh
psgganesh / transcript.vtt
Last active Mar 28, 2020
transcript.vtt
View transcript.vtt
WEBVTT
Kind: captions
Language: san
1
00:00:05.358 --> 00:00:08.277
सहस्र'शीर्षा पुरु'षः |
2
00:00:09.159 --> 00:00:13.044
@psgganesh
psgganesh / Installation.md
Created Nov 12, 2019
Vaniloapp installation
View Installation.md

Vaniloapp installation

Create a new project (optional):

composer create-project --prefer-dist laravel/laravel vaniloapp "5.8.*"
cd vaniloapp

Install the vanilo package:

@psgganesh
psgganesh / books.md
Created Jul 19, 2019 — forked from ApoTheOne/books.md
Books for software engineers
View books.md

Books for software engineers

  • Clean Code: A Handbook of Agile Software Craftsmanship
  • The Clean Coder: A Code of Conduct for Professional Programmers
  • The Pragmatic Programmer: From Journeyman to Master
  • The Phoenix Project: A Novel about IT, DevOps, and Helping your Business Win
  • Design Patterns: Elements of Reusable Object-Oriented Software
  • The Imposter's Handbook: A Primer for Self-Taught Programmers
  • Refactoring: Improving the Design of Existing Code
@psgganesh
psgganesh / Verifying my Blockstack ID is secured
Last active Jun 23, 2019
Verifying my Blockstack ID is secured
View Verifying my Blockstack ID is secured
Verifying my Blockstack ID is secured with the address 12Cp9rsfKCeWf1mVvU3wVBkVWaHn2RaMUD https://explorer.blockstack.org/address/12Cp9rsfKCeWf1mVvU3wVBkVWaHn2RaMUD
@psgganesh
psgganesh / .env.travis
Created May 25, 2019 — forked from gilbitron/.env.travis
Laravel 5 Travis CI config
View .env.travis
APP_ENV=testing
APP_KEY=SomeRandomString
DB_CONNECTION=testing
DB_TEST_USERNAME=root
DB_TEST_PASSWORD=
CACHE_DRIVER=array
SESSION_DRIVER=array
QUEUE_DRIVER=sync
View laravel_facades.md

Understanding Facades in Laravel

What's a Facade?

The Laravel explination, shown below is confusing.

Facades provide a "static" interface to classes that are available in the application's service container. Laravel ships with many facades which provide access to almost all of Laravel's features. Laravel facades serve as "static proxies" to underlying classes in the service container, providing the benefit of a terse, expressive syntax while maintaining more testability and flexibility than traditional static methods.

Many examples use Cache::get('key') to demonstrate how a Facade works. Comparing the following code to the utility that a Facade provides.