Skip to content

Instantly share code, notes, and snippets.

@MatteoOreficeIT
Last active April 5, 2017 08:40
Show Gist options
  • Save MatteoOreficeIT/81e282ab139bacd80db952c89181f2cb to your computer and use it in GitHub Desktop.
Save MatteoOreficeIT/81e282ab139bacd80db952c89181f2cb to your computer and use it in GitHub Desktop.
Which keys Laravel \Illuminate\Routing\Route::$action array could contains ( undocumented - inferred from source )
<?php
namespace Illuminate\Routing;
class Route
{
/**
* The route action array.
*
* @var array
*/
public $action = [
// Types: <string>
'prefix' => '', // es: admin
// Types: <string>:name of a function, <string>:"Class@method" style callback , Closure
'uses' => '',
'domain'=>'',
'as'=>'',
'controller'=>'',
'middleware'=>'',
];
/**
* Create a new Route instance.
*
* @param array|string $methods
* @param string $uri
* @param \Closure|array $action ------>> You can pass these keys like an array
* @return void
*/
public function __construct($methods, $uri, $action)
{
}
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment