Laravel - Action URL
Laravel 5.7 introduces a new feature called Callable Action URL. This function is similar to the one in Laravel 5.6 which accepts a string in an action method. The main purpose of the new syntax introduced in Laravel 5.7 is to allow you to access the controller directly.
The syntax used in Laravel 5.6 version is shown below −
<?php $url = action('UserController@profile', ['id' => 1]);
A similar action named in Laravel 5.7 is mentioned below −
<?php $url = action([PostsController::class, 'index']);
One benefit of the new callable array syntax is the ability to navigate directly to the controller if the developer is using a text editor or an IDE that supports code navigation.