In my view, I want to print a controller uri like this ShopController@show
.
set the var $controller = 'ShopControll';
in the view:
action($controller.'@show',$id)
but there are some error occured:
ErrorException in UrlGenerator.php line 603:
Action App\Http\Controllers\ShopController<?php echo $__env->yieldSection(); ?> not defined.
if like this:
action('ShopController@show',$id)
it works, output is:
http://example.com/show/1
So, what's the difference?