| 1 | <?php |
||
| 10 | class ClockworkController extends Controller |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var mixed |
||
| 14 | */ |
||
| 15 | protected $apiKey; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var ClockworkClient |
||
| 19 | */ |
||
| 20 | protected $client; |
||
| 21 | |||
| 22 | const MSG_NUMBER = '07700900123'; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Initialize ClockworkController |
||
| 26 | */ |
||
| 27 | public function __construct() |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Return all data to the Clockwork API dashboard |
||
| 38 | */ |
||
| 39 | public function getPage() |
||
| 43 | |||
| 44 | /** |
||
| 45 | * Send a Text Message |
||
| 46 | * |
||
| 47 | * @param Request $request |
||
| 48 | * |
||
| 49 | * @return \Illuminate\Http\RedirectResponse |
||
| 50 | */ |
||
| 51 | public function sendTextMessage(Request $request) |
||
| 65 | } |
||
| 66 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: