Download the PHP package haosheng0211/filament-media-browser without Composer

On this page you can find all versions of the php package haosheng0211/filament-media-browser. 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 filament-media-browser

Filament Media Browser

Latest Version on Packagist Total Downloads

A standalone Filament v3 media browser powered by Laravel Storage — no database required. Browse, upload, and manage files directly from the filesystem with folder navigation support.

Features

Installation

Publish the config file:

Add the package views to your tailwind.config.js content array:

Then rebuild your assets:

Make sure the storage disk is linked (for the public disk):

Configuration

Security note: Any user passing the configured guard can open the browser against any whitelisted disk. Keep allowed_disks narrow, set guard to your panel's guard, and use authorization (a Gate ability) to restrict who can read/write/delete media.

Usage

MediaPicker Field

A dedicated form field with square card previews, replace and remove buttons. Both single and multiple modes use the same grid layout with 1:1 aspect ratio cards. Stores the selected file's URL as a string (single) or array of strings (multiple) by default.

Stored value:

Available Methods

Method Description
->multiple(bool) Enable multi-select mode
->maxItems(int) Maximum number of files (multiple mode)
->reorderable(bool) Enable drag-to-reorder (multiple mode, default: true)
->mediaType(string) 'image' (default), 'media', or 'file'
->mediaDisk(string) Override config disk
->mediaDirectory(string) Override config directory
->storeAsUrl(bool) Store as Storage::url() output (default: true)
->storePath(bool) Store as relative path (e.g. media/photo.jpg)
->gridColumns(int) Number of columns in the preview grid (default: 5)

With Filament Forms TinyMCE

This package works seamlessly with filament-forms-tinymce. Once both packages are installed, TinyMCE's file picker will automatically use the media browser.

Standalone Usage via Events

The media browser communicates via Livewire events, so you can integrate it with any component.

Open the browser by dispatching the open-media-browser event:

Listen for file selection via the media-selected event:

Event Reference

Event Direction Parameters
open-media-browser You → Browser statePath, mediaType (image | media | file), multiple?, disk?, directory?, storeAsUrl?
media-selected Browser → You statePath, url, alt, title, filename, extension, size, mime

Media Types

Value Filters
image image/* only
media video/* and audio/*
file All files (no filter)

Customizing Views

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

License

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


All versions of filament-media-browser with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
filament/filament Version ^3.0
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^10.0||^11.0||^12.0
livewire/livewire 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 haosheng0211/filament-media-browser contains the following files

Loading the files please wait ...