Sarath TS
Sarath TS

Reputation: 2462

Laravel 5 storage permission

How can we set folder permission when we create make directory using Laravel 5 storage?

Storage::makeDirectory($encrypt);

Upvotes: 1

Views: 1057

Answers (2)

Emeka Mbah
Emeka Mbah

Reputation: 17520

Assuming $encrypt is a path

Storage::makeDirectory($encrypt, $mode = 0755);

Upvotes: 1

Wasim
Wasim

Reputation: 5113

You need to specify the second parameter $mode

public function makeDirectory($path, $mode = 0755, $recursive = false, $force = false)

Upvotes: 1

Related Questions