$path = storage_path('app/file.txt');
$contents = Storage::disk('local')->get('file.txt');
use IlluminateSupportFacadesStorage;
$path = Storage::path('file.jpg');
// First Method
use IlluminateSupportFacadesStorage;
Storage::disk('local')->put('example.txt', 'Contents');
// Second Method
$request->file('image')->storePublicly('images/media', ['disk' => 'public']);
//$file is full path
echo basename($file);
Code Example |
---|
Php :: php dump |
Php :: php mkdir |
Php :: make a object php |
Php :: string to int php |
Php :: laravel change column |
Php :: wordpress show notice |
Php :: php artisan vendor:publish |
Php :: increase memory laravel controller |
Php :: laravel where like |
Php :: get size files in laravel |
Php :: google translate api php |
Php :: php convert mb to bytes |
Php :: php http_build_query |
Php :: server cmd php |
Php :: publish Laravel mail pages to customize |
Php :: get post url from post id wordpress |
Php :: make model with migration laravel |
Php :: wp debug |
Php :: capitalize php |
Php :: laravel eloquent where id not equal to |
Php :: get full current url in laravel |
Php :: laravel difference between fill and update |
Php :: insall laravel |
Php :: How to get a substring between two strings in PHP? |
Php :: How to call soap api in php using curl method |
Php :: install laravel |
Php :: delete after 30 days in php |
Php :: carbon get time |
Php :: php date from format |
Php :: php strftime |