mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
parent
ded1a59914
commit
ab8792a13d
|
@ -134,12 +134,12 @@ final class CompaniesController extends Controller
|
||||||
*/
|
*/
|
||||||
public function destroy($companyId)
|
public function destroy($companyId)
|
||||||
{
|
{
|
||||||
$this->authorize('delete', $company);
|
|
||||||
|
|
||||||
if (is_null($company = Company::find($companyId))) {
|
if (is_null($company = Company::find($companyId))) {
|
||||||
return redirect()->route('companies.index')
|
return redirect()->route('companies.index')
|
||||||
->with('error', trans('admin/companies/message.not_found'));
|
->with('error', trans('admin/companies/message.not_found'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->authorize('delete', $company);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue