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

$path = public_path('css/app.css');
<?php     'links' => [

        public_path('storage') => storage_path('app/public'),

    ],



];
<?php     protected function startProcess($hasEnvironment)

    {

        $process = new Process($this->serverCommand(), public_path(), collect($_ENV)->mapWithKeys(function ($value, $key) use ($hasEnvironment) {

            if ($this->option('no-reload') || ! $hasEnvironment) {

                return [$key => $value];

            }
<?php     protected function links()

    {

        return $this->laravel['config']['filesystems.links'] ??

               [public_path('storage') => storage_path('app/public')];

    }
<?php     protected function links()

    {

        return $this->laravel['config']['filesystems.links'] ??

               [public_path('storage') => storage_path('app/public')];

    }

}
<?php             $manifestDirectory = "/{$manifestDirectory}";

        }



        if (is_file(public_path($manifestDirectory.'/hot'))) {

            $url = rtrim(file_get_contents(public_path($manifestDirectory.'/hot')));



            $customUrl = app('config')->get('app.mix_hot_proxy_url');
<?php         }



        if (is_file(public_path($manifestDirectory.'/hot'))) {

            $url = rtrim(file_get_contents(public_path($manifestDirectory.'/hot')));



            $customUrl = app('config')->get('app.mix_hot_proxy_url');
<?php             return new HtmlString("//localhost:8080{$path}");

        }



        $manifestPath = public_path($manifestDirectory.'/mix-manifest.json');



        if (! isset($manifests[$manifestPath])) {

            if (! is_file($manifestPath)) {
<?php     public function hotFile()

    {

        return $this->hotFile ?? public_path('/hot');

    }
<?php         $chunk = $this->chunk($this->manifest($buildDirectory), $asset);



        $path = public_path($buildDirectory.'/'.$chunk['file']);



        if (! is_file($path) || ! file_exists($path)) {

            throw new Exception("Unable to locate file from Vite manifest: {$path}.");
<?php     protected function manifestPath($buildDirectory)

    {

        return public_path($buildDirectory.'/'.$this->manifestFilename);

    }
<?php     {

        app()->usePublicPath(__DIR__);



        $path = public_path(Str::finish($directory, '/').'hot');
<?php     {

        app()->usePublicPath(__DIR__);



        $path = public_path(Str::finish($directory, '/').'mix-manifest.json');



        touch($path);
<?php     public function testItThrowsWhenUnableToFindAssetManifestInBuildMode()

    {

        $this->expectException(Exception::class);

        $this->expectExceptionMessage('Vite manifest not found at: '.public_path('build/manifest.json'));



        ViteFacade::asset('resources/js/app.js');

    }
<?php     {

        $buildDir = Str::random();

        app()->usePublicPath(__DIR__);

        if (! file_exists(public_path($buildDir))) {

            mkdir(public_path($buildDir));

        }

        $contents = json_encode([
<?php         $buildDir = Str::random();

        app()->usePublicPath(__DIR__);

        if (! file_exists(public_path($buildDir))) {

            mkdir(public_path($buildDir));

        }

        $contents = json_encode([

            'resources/js/app.js' => [