| 1 | <?php |
||
| 25 | abstract class Controller extends BaseController |
||
| 26 | { |
||
| 27 | use DispatchesJobs, ValidatesRequests; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Current logged in user. |
||
| 31 | * |
||
| 32 | * @var Guard |
||
| 33 | */ |
||
| 34 | protected $auth; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Constructor, inject an instance of logged user. |
||
| 38 | * |
||
| 39 | * @param \Illuminate\Contracts\Auth\Guard $auth |
||
| 40 | */ |
||
| 41 | 58 | public function __construct(Guard $auth) |
|
| 45 | |||
| 46 | /** |
||
| 47 | * Return instance of the logged user. |
||
| 48 | * |
||
| 49 | * @return Model\User |
||
| 50 | */ |
||
| 51 | protected function getLoggedUser() |
||
| 61 | } |
||
| 62 |