Download the PHP package valter-medeiros/laravel-sharepoint without Composer

On this page you can find all versions of the php package valter-medeiros/laravel-sharepoint. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-sharepoint

Laravel SharePoint Filesystem Driver

Tests Latest Version on Packagist License

A Flysystem V3 adapter for Laravel that allows you to use Microsoft SharePoint and OneDrive as a storage disk via the Microsoft Graph API.

This package includes a unique secure certificate handler that allows you to encrypt your .pfx certificates using Laravel's built-in encryption, ensuring your private keys are never stored in plaintext on your server.

Features

Requirements

Installation

You can install the package via composer:

Configuration

  1. Open your config/filesystems.php file and add the sharepoint disk to the disks array:

  2. Add the corresponding variables to your .env file:

Secure Certificate Authentication (Recommended)

Storing .pfx certificates in plaintext on your server can be a security risk. This package provides a command to encrypt your certificate using your Laravel APP_KEY. The package will decrypt it on-the-fly in memory when authenticating with Microsoft Graph.

  1. Upload your .pfx file to your server temporarily.
  2. Run the encryption command:

  3. This will generate a new file named certificate.pfx.enc.
  4. Delete the original .pfx file from your server.
  5. Update your .env file to point to the new .enc file:

Usage

Once configured, you can use the disk just like any other Laravel storage disk:

Finding your Drive ID

If you don't specify a SHAREPOINT_DRIVE_ID, the package will attempt to use the default drive associated with the authenticated application.

To target a specific SharePoint Document Library, you will need its Drive ID. You can find this using the built-in artisan command or Microsoft Graph Explorer.

Using the Artisan Command (Recommended)

  1. First, you need your Site ID. You can find this by taking your SharePoint site URL and appending /_api/site/id/ to it.

    • Example: https://universidadedosacores.sharepoint.com/sites/MySite/_api/site/id/
    • The Site ID usually looks like: universidadedosacores.sharepoint.com,4252a976-98b4-48ae-b79c-abb17b10f02c
  2. Add this Site ID to your .env file:

  3. Run the list-drives command:

(You can also pass the site ID directly to the command: php artisan sharepoint:list-drives "your-site-id")

You can also search for a specific drive by name:

  1. The command will output a table of all available document libraries and their Drive IDs. Copy the ID of the library you want to use and add it to your .env file:

Finding a Specific Folder ID (Optional)

If you need to find the ID of a specific folder inside a drive, you can use the list-folders command:

You can also search for a specific folder by name, or look inside a specific path:

Using Microsoft Graph Explorer

Alternatively, you can find your Site ID and Drive ID manually using the Microsoft Graph Explorer. For a detailed guide on how to do this, check out this excellent tutorial: SharePoint: Find Site ID and Drive IDs - Dave Herrell

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-sharepoint with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
ext-openssl Version *
guzzlehttp/guzzle Version ^7.0
illuminate/cache Version ^10.0|^11.0|^12.0
illuminate/console Version ^10.0|^11.0|^12.0
illuminate/filesystem Version ^10.0|^11.0|^12.0
illuminate/support Version ^10.0|^11.0|^12.0
league/flysystem Version ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package valter-medeiros/laravel-sharepoint contains the following files

Loading the files please wait ...