In laravel you can use 'public' or 'private' disks and set the permissions options in the config file filesystems.php
https://laravel.com/docs/8.x/filesystem#permissions
The public visibility translates to 0755 for directories and 0644 for files. You can modify the permissions mappings in your filesystems configuration file:
'local' => [ 'driver' => 'local', 'root' => storage_path('app'), 'permissions' => [ 'file' => [ 'public' => 0664, 'private' => 0600, ], 'dir' => [ 'public' => 0775, 'private' => 0700, ], ], ],
You can then store files with specific visibility like it suggests here https://laravel.com/docs/8.x/filesystem#file-visibility
Or you can use the built in php function chmod()
https://www.php.net/manual/en/function.chmod.php