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()); //$res = $repo->pull(); $output = $repo->execute('pull origin'); info(print_r($output,1)); Artisan::call('ninja:post-update'); return response()->json(['message'=>$res], 200); } }