Skip to content

Instantly share code, notes, and snippets.

@ruslanashaari
Last active September 23, 2017 02:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ruslanashaari/9e3835cbf94f891ecf9ffd776c59dadd to your computer and use it in GitHub Desktop.
Save ruslanashaari/9e3835cbf94f891ecf9ffd776c59dadd to your computer and use it in GitHub Desktop.
call route without function with invoke (only for single function in controller)
<?php
//in controller if there is only a single function
public function __invoke(){
}
//in routes just call controller name without @(function name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment