json(['message' => 'Self update not available on this system.'], 403); } /* .git MUST be owned/writable by the webserver user */ $repo = new GitRepository(base_path()); info("Are there changes to pull? " . $repo->hasChanges()); try{ $res = $repo->pull(); } catch(GitException $e) { info($e->getMessage()); } info("Are there any changes to pull? " . $repo->hasChanges()); Artisan::call('ninja:post-update'); return response()->json(['message'=>$res], 200); } }