Laravel Redirect To Another URL / Web Page - HTTP Laravel Redirects

Laravel – check if folder exists before create directory

Today, We want to share with you Laravel – check if folder exists before create directory.In this post we will show you Laravel Check if a directory exists based on path, hear for How to delete files if exists from public folder in Laravel 5.8 we will give you demo and example for implement.In this post, we will learn about PHP Laravel 5.8 Create directory if it doesn’t exist with an example.

List of all Google Adsense, VueJS, AngularJS, PHP, Laravel Examples.

Laravel – check if folder exists before create directory

There are the Following The simple About Laravel – check if folder exists before create directory Full Information With Example and source code.

As I will cover this Post with live Working example to develop unable to create the directory laravel, so the how to create a folder using laravel for this example is following below.

Laravel – Create Directory if not Exists

public function formTestSubmit(Request $request)
    $get_path = public_path('upload/');
        File::makeDirectory($get_path, 0777, true, true);
    dd('check if folder exists before create directory :  ---> done');

Laravel – Check if File Exists

    dd('your File is exists.');
    dd('your File is not exists.');

Laravel – Check if File Readable

$myfile = public_path('employee/invoice.txt'); 
// checking whether file is readable or not 
if (is_readable($myfile))  
    echo '$myfile is readable'; 
    echo '$myfile is not readable'; 

Laravel – Check if Link File

Laravel – link to a file saved in storage folder

use Illuminate\Support\Facades\Storage;

$url = Storage::url('file1.jpg');

Web Programming Tutorials Example with Demo

Read :


You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about Laravel – check if folder exists before create directory.
I would like to have feedback on my blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Related FAQ

Here are some more FAQ related to this Article:

  1.   Vue Js Countdown Timer Vue Component
  2.   Laravel Get Absolute Path Document Root Base URL
  3.   Angularjs Convert string to integer Example
  4.   jQuery Ajax change dropdown list value
  5.   Codeigniter Helpers Example
  6.   jQuery Form Validator Script
  7.   Laravel 6 Count from Join Example
  8.   vue js Accessing Complex Nested JSON objects
  9.   Laravel 6 Multiple Where Eloquent Query
  10.   Laravel Role based permission ACL Tutorial