add the storage macro public
This commit is contained in:
@@ -5,6 +5,7 @@ namespace App\Providers;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Exception;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use PDOException;
|
||||
|
||||
class AppServiceProvider extends ServiceProvider
|
||||
@@ -26,6 +27,9 @@ class AppServiceProvider extends ServiceProvider
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
//
|
||||
Storage::macro('public', function ($diskName) {
|
||||
$public = config("filesystems.disks.{$diskName}.public", false);
|
||||
return $public;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user