1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-09 20:52:56 +01:00

Merge branch 'develop' of github.com:invoiceninja/invoiceninja into develop

This commit is contained in:
Hillel Coren 2017-10-25 12:22:10 +03:00
commit e20f70f8ae
2 changed files with 28 additions and 1 deletions

View File

@ -2,6 +2,7 @@
namespace App\Http\Controllers;
use App\Http\Requests\DeleteVendorRequest;
use App\Http\Requests\VendorRequest;
use App\Http\Requests\CreateVendorRequest;
use App\Http\Requests\UpdateVendorRequest;
@ -186,7 +187,7 @@ class VendorApiController extends BaseAPIController
* )
* )
*/
public function destroy(UpdateVendorRequest $request)
public function destroy(DeleteVendorRequest $request)
{
$vendor = $request->entity();

View File

@ -0,0 +1,26 @@
<?php
namespace App\Http\Requests;
class DeleteVendorRequest extends VendorRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return $this->entity() && $this->user()->can('edit', $this->entity());
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [];
}
}