Handles the update method, that also has the ability parameter as edit instead of update"

q
This commit is contained in:
Ivan Nieto 2020-03-06 15:50:22 -06:00
parent ead59ecf78
commit d7dc0e451e

View file

@ -120,7 +120,7 @@ class ManufacturersController extends Controller
*/
public function update(ImageUploadRequest $request, $manufacturerId = null)
{
$this->authorize('edit', Manufacturer::class);
$this->authorize('update', Manufacturer::class);
// Check if the manufacturer exists
if (is_null($manufacturer = Manufacturer::find($manufacturerId))) {
// Redirect to the manufacturer page