controller.php 533 B

123456789101112131415161718192021
  1. <?php namespace Laravel;
  2. abstract class Controller {
  3. /**
  4. * A stub method that will be called before every request to the controller.
  5. *
  6. * If a value is returned by the method, it will be halt the request process
  7. * and will be considered the response to the request.
  8. *
  9. * @param Request $request
  10. * @return mixed
  11. */
  12. public function before($request) {}
  13. /**
  14. * Magic Method to handle calls to undefined functions on the controller.
  15. */
  16. public function __call($method, $parameters) { return new Error('404'); }
  17. }