Answers for "how to access public folder laravel"

PHP
2

how to store file in public folder laravel

You can create a new storage disc in config/filesystems.php
'public_uploads' => [
    'driver' => 'local',
    'root'   => public_path() . '/uploads',
],

And store files like this:

if(!Storage::disk('public_uploads')->put($path, $file_content)) {
    return false;
}
Posted by: Guest on December-12-2021
0

laravel apache public folder

//Laravel -> Jump to /public by default
//On the root file create an htaccess file with this data:
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/public/
RewriteRule ^(.*)$ /public/$1 [L,QSA]
Posted by: Guest on April-17-2021
1

laravel get file in public folder

Storage::get('\public\FileNameHere')
Posted by: Guest on January-07-2021

Code answers related to "how to access public folder laravel"

Browse Popular Code Answers by Language