json(['message' => 'Self update not available on this system.'], 403); } /* .git MUST be owned/writable by the webserver user */ $repo = new GitRepository(base_path()); $res = $repo->pull(); Artisan::call('ninja:post-update'); return response()->json(['message'=>$res], 200); } }