Skip to content

Commit 934b974

Browse files
committed
add example of callable action syntax
1 parent aac5e3e commit 934b974

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

helpers.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,6 +1014,8 @@ The `action` function generates a URL for the given controller action. You do no
10141014

10151015
$url = action('HomeController@index');
10161016

1017+
$url = action([HomeController::class, 'index']);
1018+
10171019
If the method accepts route parameters, you may pass them as the second argument to the method:
10181020

10191021
$url = action('UserController@profile', ['id' => 1]);

0 commit comments

Comments
 (0)