Debugging company deletion
This commit is contained in:
parent
959f172650
commit
eec55a38dd
|
|
@ -466,10 +466,14 @@ class CompanyController extends BaseController
|
||||||
*/
|
*/
|
||||||
public function destroy(DestroyCompanyRequest $request, Company $company)
|
public function destroy(DestroyCompanyRequest $request, Company $company)
|
||||||
{
|
{
|
||||||
|
info(print_r($request->all()));
|
||||||
|
info("destroying {$company->present()->name()} - {$company->hashed_id}");
|
||||||
|
|
||||||
$company_count = $company->account->companies->count();
|
$company_count = $company->account->companies->count();
|
||||||
$account = $company->account;
|
$account = $company->account;
|
||||||
|
|
||||||
|
info("company count = {$company_count}");
|
||||||
|
|
||||||
if ($company_count == 1) {
|
if ($company_count == 1) {
|
||||||
|
|
||||||
$company->company_users->each(function ($company_user) {
|
$company->company_users->each(function ($company_user) {
|
||||||
|
|
|
||||||
|
|
@ -45,8 +45,6 @@ class StartupCheck
|
||||||
Session::flash('message', 'Cache cleared');
|
Session::flash('message', 'Cache cleared');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Make sure our cache is built */
|
/* Make sure our cache is built */
|
||||||
$cached_tables = config('ninja.cached_tables');
|
$cached_tables = config('ninja.cached_tables');
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue