laravel里面一个controller中的方法要调用另一个controller中的方法要怎么做?
比如:
AaaController.php
<?php
namespace App\Http\Controllers;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class AaaController extends Controller
{
public function aaa()
{
//...
}
}
BbbController.php
<?php
namespace App\Http\Controllers;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class BbbController extends Controller
{
public function bbb()
{
//这里要调用aaa(),应该怎么做?
}
}
BbbController中的bbb()方法要调用AaaController中的aaa()方法,要怎么做?