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