Laravel Developer
David Carr
Web Developer
All Posts Archives Categories Authors
About Books Packages Templates Contact
Blog
All Posts Archives Categories Authors
About Books Packages Templates Contact
Laravel Box
Laravel Packages
Laravel Microsoft Graph Laravel Xero Laravel Sent Emails Laravel Dropbox Laravel Box Laravel Companies House Laravel Countries Laravel Eventbrite Laravel Blade Components
PHP Packages
PDO Wrapper PHP find and replace JSON SQL Import IMAP Export CSV Pagination
v1
Navigation
  • Introduction
  • Install
  • Files
  • Folders
Navigation
  • Introduction
  • Install
  • Files
  • Folders

Files

This package provides a clean way of working with files.

To work with files first call ->files() followed by a method.

Get file

Accepts a file id, returns an array.

Box::files()->file($id);

Download file

Accepts a file id Optionally a path can be used when $storeDownload is set to true. To download the file only an id is required.

Box::files()->download($id, $path = '', $storeDownload = false);

Upload file

Accepts a file path and filename. Optionally specify the parent, defaults to 0 when omitted.

Box::files()->upload($path, $name, $parent = 0);

Upload revision

Accepts the file id, file path and filename. Optionally specify a new name.

Box::files()->uploadRevision($file_id, $filepath, $name, $newname = null);

Delete file

Accepts a file id, returns no output.

Box::files()->destroy($id);
Table of Contents
  • Get file
  • Download file
  • Upload file
  • Upload revision
  • Delete file

DCBlog

Practical tutorials, code snippets, and in-depth guides for modern web development. Helping developers build better applications since 2009.

Subscribe to my newsletter for the latest updates on my books and digital products.

© 2009 - 2025 DC Blog. All rights reserved.

Privacy Policy • Terms of Service