Open AleksandarVucenic opened 9 years ago
Yes, you're right. The action
function always start with app namespace. That's default from Laravel 5.
Is there any way to change that because I didnt find that in documentation and any where else
heh i was just looking for the same thing , for now I just did
{{ action('\Modules\blah\Http\Controllers\blahController@index') }}
Im thinking of doing creating a PR so we don't have to do that, but if its already in the works i don't want to waste to much time on this.
it would be really cool if you could leave the namespace there away, instead taking something like a controller namespace you set somewhere.
What I want todo: {!!URL::action('CupController@mappacks')!!}
Routes: Route::group(array('namespace' => 'App\Http\Controllers'), function () { ... Route::get('rules', 'CupController@rules'); ... });
now it always says the action is not defined as long I don't append the whole namespace.
I would like to be able to use the action() function as follows:
<form action="{{ action('SomeController@someMethod') }}"> ...
where SomeController
is a controller in my module.
Is this possible with pingpong modules or is a user forced to use the full path to the module? It would be great if it were possible to avoid the full path. @kremsy's method above looks like a nice wat to configure it.
That's not possible, even in laravel without pingpong modules, if your controllers use namespaces.
Maybe I wrong but this function giving default namespace App\Http\Controller and if I try to call some controller form Modules folder I get default namspace or I did somthing wrong is there any way to do this correctly