Gitamin\Http\Controllers\Projects\BlobController::raw PHP Method

raw() public method

public raw ( $owner, $project, $commitishPath )
    public function raw($owner, $project, $commitishPath)
    {
        $repository = $project->getRepository();
        list($branch, $file) = $this->extractReference($repository, $commitishPath, $project->slug);
        $blob = $repository->getBlob("{$branch}:\"{$file}\"")->output();
        $headers = [];
        if (app('git_util')->isBinary($file)) {
            $headers['Content-Disposition'] = 'attachment; filename="' . $file . '"';
            $headers['Content-Type'] = 'application/octet-stream';
        } else {
            $headers['Content-Type'] = 'text/plain';
        }
        return Response::make($blob, 200, $headers);
    }
BlobController