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:
$path base_path();

$path base_path('vendor/bin');
        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');
            copy(__DIR__.'/../stubs/rr.yaml'base_path('.rr.yaml'));

        }



        return 
base_path('rr');

    }
    protected function ensureRoadRunnerBinaryMeetsRequirements($roadRunnerBinary)

    {

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

            ->
run()

            ->
getOutput();
            'get-binary',

            
'-n',

            
'--ansi',

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

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

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

        );



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



        
$this->line('');

    }
        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'), nullnullnull))->start();

    }
            return false;

        }



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

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

                ->
each(function ($file) {

                    
$contents File::get(base_path('.gitignore'));
        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'),
                    $contents File::get(base_path('.gitignore'));

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

                        
File::append(

                            
base_path('.gitignore'),

                            
$file.PHP_EOL

                        
);

                    }
            '-o''logs.output=stdout',

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

            
'serve',

        ]), 
base_path(), [

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

            
'APP_BASE_PATH' => base_path(),

            
'LARAVEL_OCTANE' => 1,
            'serve',

        ]), 
base_path(), [

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

            
'APP_BASE_PATH' => base_path(),

            
'LARAVEL_OCTANE' => 1,

        ]))->
start();
        $path $this->option('rr-config');



        if (! 
$path) {

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



            return 
base_path('.rr.yaml');

        }
        if (! $path) {

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



            return 
base_path('.rr.yaml');

        }



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

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

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

            
'APP_BASE_PATH' => base_path(),

            
'LARAVEL_OCTANE' => 1,

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

    
{

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

            return 
base_path('rr');

        }