The base_path function returns the fully qualified path to your application's root directory. You may also use the base_path function to generate a fully qualified path to a given file relative to the project root directory:
<?php $path = base_path();

$path = base_path('vendor/bin');
<?php         if ($this->confirm('Unable to locate RoadRunner binary. Should Octane download the binary for your operating system?', true)) {

            $this->downloadRoadRunnerBinary();



            copy(__DIR__.'/../stubs/rr.yaml', base_path('.rr.yaml'));

        }



        return base_path('rr');
<?php             copy(__DIR__.'/../stubs/rr.yaml', base_path('.rr.yaml'));

        }



        return base_path('rr');

    }
<?php     protected function ensureRoadRunnerBinaryMeetsRequirements($roadRunnerBinary)

    {

        $version = tap(new Process([$roadRunnerBinary, '--version'], base_path()))

            ->run()

            ->getOutput();
<?php             'get-binary',

            '-n',

            '--ansi',

        ]), base_path(), null, null, null))->mustRun(

            fn ($type, $buffer) => $this->output->write($buffer)

        );
<?php             fn ($type, $buffer) => $this->output->write($buffer)

        );



        chmod(base_path('rr'), 755);



        $this->line('');

    }
<?php         return tap(new Process([

            (new ExecutableFinder)->find('node'),

            'file-watcher.js',

            json_encode(collect(config('octane.watch'))->map(fn ($path) => base_path($path))),

        ], realpath(__DIR__.'/../../../bin'), null, null, null))->start();

    }
<?php             return false;

        }



        if (File::exists(base_path('.gitignore'))) {

            collect(['rr', '.rr.yaml'])

                ->each(function ($file) {

                    $contents = File::get(base_path('.gitignore'));
<?php         if (File::exists(base_path('.gitignore'))) {

            collect(['rr', '.rr.yaml'])

                ->each(function ($file) {

                    $contents = File::get(base_path('.gitignore'));

                    if (! Str::contains($contents, $file.PHP_EOL)) {

                        File::append(

                            base_path('.gitignore'),
<?php                     $contents = File::get(base_path('.gitignore'));

                    if (! Str::contains($contents, $file.PHP_EOL)) {

                        File::append(

                            base_path('.gitignore'),

                            $file.PHP_EOL

                        );

                    }
<?php             '-o', 'logs.output=stdout',

            '-o', 'logs.encoding=json',

            'serve',

        ]), base_path(), [

            'APP_ENV' => app()->environment(),

            'APP_BASE_PATH' => base_path(),

            'LARAVEL_OCTANE' => 1,
<?php             'serve',

        ]), base_path(), [

            'APP_ENV' => app()->environment(),

            'APP_BASE_PATH' => base_path(),

            'LARAVEL_OCTANE' => 1,

        ]))->start();
<?php         $path = $this->option('rr-config');



        if (! $path) {

            touch(base_path('.rr.yaml'));



            return base_path('.rr.yaml');

        }
<?php         if (! $path) {

            touch(base_path('.rr.yaml'));



            return base_path('.rr.yaml');

        }



        if ($path && ! realpath($path)) {
<?php             (new PhpExecutableFinder)->find(), 'swoole-server', $serverStateFile->path(),

        ], realpath(__DIR__.'/../../bin'), [

            'APP_ENV' => app()->environment(),

            'APP_BASE_PATH' => base_path(),

            'LARAVEL_OCTANE' => 1,

        ]))->start();
<?php     protected function findRoadRunnerBinary(): ?string

    {

        if (file_exists(base_path('rr'))) {

            return base_path('rr');

        }