Is it possible to call a method from one controller inside another controller in Laravel 5 (regardless the http method used to access each method)?
相关问题
- Laravel Option Select - Default Issue
- What uses more memory in c++? An 2 ints or 2 funct
- How to get the maximum of more than 2 numbers in V
- Laravel 5.1 MethodNotAllowedHttpException on store
- Laravel - Implicit route model binding with soft d
相关文章
- 关于Asp.net Mvc Core重写Initialize方法的问题
- laravel create model from custom stub when using p
- send redirect and setting cookie, using laravel 5
- Spring: controller inheritance using @Controller a
- How to send parameters to queues?
- Bcrypt vs Hash in laravel
- Laravel: What's the advantage of using the ass
- Capture method calls in Java
This is how I have done it. Use the
use
keyword to make the OtherController available. Then you can call a method from that class on instantiation.Also check out the concept of a Command in Laravel. It might give you more flexibility than the method above.