Php Laravel管线不使用参数

Php Laravel管线不使用参数,php,laravel,routes,Php,Laravel,Routes,我的项目昨天和今天都很顺利,没有那么多。但据我所知,我没有改变任何事情 在my home.blade.php中 <form method="POST" action="/cart/add/{{$offer->id}}"> {{ csrf_field() }} <div class="form-group"> <button type="submit" class="btn btn-success"> Accept Offer

我的项目昨天和今天都很顺利,没有那么多。但据我所知,我没有改变任何事情

在my home.blade.php中

<form method="POST" action="/cart/add/{{$offer->id}}">
{{ csrf_field() }}
<div class="form-group">
    <button type="submit" class="btn btn-success">
       Accept Offer
    </button>
</div>                                              
</form>
在my cartcontroller.php中

class CartController extends Controller
{
    public function store($id){
     //some code stuff here
     return view('home');
    }
}
但我遇到了一个我从未见过的错误,我不太确定从哪里开始:

Declaration of App\Http\Controllers\CartController::authorize($id) should be 
compatible with App\Http\Controllers\Controller::authorize($ability, $arguments 
= Array)
你知道我应该从哪里开始吗?
谢谢,

您已经重写了authorize函数,但是使用了不同的参数,这将导致您的错误。请显示控制器类中的内容?也许你有存储方法在里面?Neat是对的,我完全没有意识到我已经超越了授权函数,现在看起来很愚蠢,谢谢。
Declaration of App\Http\Controllers\CartController::authorize($id) should be 
compatible with App\Http\Controllers\Controller::authorize($ability, $arguments 
= Array)