OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
firebase
/
vendor
/
kreait
/
firebase-php
/
docs
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
08/12/2024 10:34:12 AM
rwxr-xr-x
📄
Makefile
7.68 KB
08/12/2024 10:33:24 AM
rw-r--r--
📁
_static
-
08/12/2024 10:34:12 AM
rwxr-xr-x
📁
_templates
-
08/12/2024 10:34:12 AM
rwxr-xr-x
📄
authentication.rst
13.82 KB
08/12/2024 10:33:24 AM
rw-r--r--
📄
cloud-firestore.rst
2.37 KB
08/12/2024 10:33:24 AM
rw-r--r--
📄
cloud-messaging.rst
26.18 KB
08/12/2024 10:33:24 AM
rw-r--r--
📄
cloud-storage.rst
2.5 KB
08/12/2024 10:33:24 AM
rw-r--r--
📄
conf.py
1.17 KB
08/12/2024 10:33:24 AM
rw-r--r--
📄
dynamic-links.rst
11.35 KB
08/12/2024 10:33:24 AM
rw-r--r--
📄
framework-integrations.rst
505 bytes
08/12/2024 10:33:24 AM
rw-r--r--
📄
index.rst
2.31 KB
08/12/2024 10:33:24 AM
rw-r--r--
📄
overview.rst
4.51 KB
08/12/2024 10:33:24 AM
rw-r--r--
📄
realtime-database.rst
20.11 KB
08/12/2024 10:33:24 AM
rw-r--r--
📄
remote-config.rst
7.96 KB
08/12/2024 10:33:24 AM
rw-r--r--
📄
requirements.txt
40 bytes
08/12/2024 10:33:24 AM
rw-r--r--
📄
setup.rst
8.29 KB
08/12/2024 10:33:24 AM
rw-r--r--
📄
troubleshooting.rst
10.57 KB
08/12/2024 10:33:24 AM
rw-r--r--
📄
tutorials.rst
1.71 KB
08/12/2024 10:33:24 AM
rw-r--r--
📄
user-management.rst
18.32 KB
08/12/2024 10:33:24 AM
rw-r--r--
Editing: cloud-storage.rst
Close
############# Cloud Storage ############# Cloud Storage for Firebase stores your data in `Google Cloud Storage <https://cloud.google.com/storage>`_, an exabyte scale object storage solution with high availability and global redundancy. This SDK provides a bridge to the `google/cloud-storage <https://packagist.org/packages/google/cloud-storage>`_ package. You can enable the component in the SDK by adding the package to your project dependencies: Before you start, please read about Firebase Cloud Storage in the official documentation: - `Firebase Cloud Storage <https://firebase.google.com/docs/storage/>`_ - `Introduction to the Admin Cloud Storage API <https://firebase.google.com/docs/storage/admin/start>`_ - `PHP API Documentation <https://googleapis.github.io/google-cloud-php/#/docs/cloud-storage>`_ - `PHP Usage examples <https://github.com/GoogleCloudPlatform/php-docs-samples/blob/master/storage>`_ ********************************** Initializing the Storage component ********************************** **With the SDK** .. code-block:: php $storage = $factory->createStorage(); **With Dependency Injection** (`Symfony Bundle <https://github.com/kreait/firebase-bundle>`_/`Laravel/Lumen Package <https://github.com/kreait/laravel-firebase>`_) .. code-block:: php use Kreait\Firebase\Storage; class MyService { public function __construct(Storage $storage) { $this->storage = $storage; } } **With the Laravel** ``app()`` **helper** (`Laravel/Lumen Package <https://github.com/kreait/laravel-firebase>`_) .. code-block:: php $storage = app('firebase.storage'); *************** Getting started *************** .. code-block:: php $storageClient = $storage->getStorageClient(); $defaultBucket = $storage->getBucket(); $anotherBucket = $storage->getBucket('another-bucket'); ********************** Default Storage bucket ********************** .. note:: It is not necessary to change the default storage bucket in most cases. The SDK assumes that your project's default storage bucket name has the format ``<project-id>.appspot.com`` and will configure the storage instance accordingly. If you want to change the default bucket your instance works with, you can specify the name when using the factory: .. code-block:: php use Kreait\Firebase\Factory; $storage = (new Factory()) ->withDefaultStorageBucket('another-default-bucket') ->createStorage();