Skip to content

Instantly share code, notes, and snippets.

View vthanh6494's full-sized avatar

vthanh vthanh6494

View GitHub Profile

What happens when you type an URL in the browser and press enter ?

  • Remenber: each Website you visit is stored in DNS under key value pair that called IP and Url. It's look like a number phone book.
  • When type an url in browser and hit the enter, browser check four cache: browser cache, OS cache, Router cache and ISP cache.
  • If your Requested Url is not in any cache. The ISP's DNS server intitates a DNS query to find the IP address of the web you want to hit.
  • The purpose of a DNS query is to search multiple DNS servers recursively because the search via a DNS recursor will continue repeatedly from DNS server to another DNS server until finds the IP address we need or returns an error response saying it was unable to find it.
  • S

Installing Silex and Webserver Configuration (Xampp):

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

Firstly, please make sure that your machine should install PHP 5.3.2+ and composer on window already.
How to know whether your PC has installed composer or not? please open cmd and type composer --version.

jwt-api-laravel-5.8-version-apply-dependency-injection (DI)

Prerequisites

This document is expanded from previous document https://gist.github.com/vthanh6494/79948df66142bb4833d390ee3cc545e1.

Therefore, this document just focuses on how to apply DI in the application.

What is Dependency Injection - DI?

DI is design pattern of Inversion of Control (in Laravel 5. Service container) helps to get data from database smoothly, which follows Dependency Inversion Principle:

- High-level modules should not depend on low-level modules. Both should depend on Interface/ abstractions.