前言
The access token of FB App
Composer require guzzlehttp/guzzle
use GuzzleHttp\Client;
$client = new Client();
$response_origin = $client->request('GET', url);
1  | $response_origin = $client->request('POST', url,  | 
$response = json_decode($response_origin->getBody())
$data = $response->data
在 OOP 的設計模式中,類別和介面扮演重要角色,讓我們可以遵守不重複原則(DRY)。
類別如同房屋的藍圖,所有物件都是照著類別建構的實際的房子。
物件透過 $this 關鍵字來參考自己。
          
            
Laravel61  | use Illuminate\Support\Facades\Auth;  | 
如果 token 是對的,即有通過 if($user), 要記得
Auth::login($user);這樣之後使用Auth::user();才會有值
1  | 'guards' => [  | 
1  | public function handle($request, Closure $next, $role)  |