Skip to content

Instantly share code, notes, and snippets.

@kejyun
Created January 26, 2015 14:47
Show Gist options
  • Save kejyun/c4cefe3cadea0ef48354 to your computer and use it in GitHub Desktop.
Save kejyun/c4cefe3cadea0ef48354 to your computer and use it in GitHub Desktop.
<?php namespace Services\Pokemon;
// model/Services/Pokemon/PokemonFacade.php
use \Illuminate\Support\Facades\Facade;
/**
* Facade class to be called whenever the class PokemonService is called
* Facade 類別當 PokemonService 被呼叫時呼叫
*/
class PokemonFacade extends Facade {
/**
* Get the registered name of the component. This tells $this->app what record to return
* (e.g. $this->app[‘pokemonService’])
* 取得註冊的元件名稱,這裡會告訴 $this->app 去回傳什麼樣的資料 (例如: $this->app[‘pokemonService’])
*
* @return string
*/
protected static function getFacadeAccessor() { return 'pokemonService'; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment