PHPackages                             hxsen/file-selector - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. hxsen/file-selector

ActiveLibrary[File &amp; Storage](/categories/file-storage)

hxsen/file-selector
===================

A file selector for laravel-admin

v1.2.1(6y ago)016MITHTMLPHP &gt;=7.0.0CI failing

Since Mar 30Pushed 6y ago1 watchersCompare

[ Source](https://github.com/hxsen/file-selector)[ Packagist](https://packagist.org/packages/hxsen/file-selector)[ Docs](https://github.com/hxsen/file-selector)[ RSS](/packages/hxsen-file-selector/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (3)Versions (6)Used By (0)

laravel-admin extension
=======================

[](#laravel-admin-extension)

laravel-admin的扩展，选择并使用媒体库的文件

### 安装

[](#安装)

```
omposer require hxsen/file-selector

```

### 发布资源

[](#发布资源)

```
php artisan vendor:publish --provider=Encore\FileSelector\FileSelectorServiceProvider

```

### 配置管理

[](#配置管理)

打开`config/admin.php`，在扩展部分添加属于此扩展的配置。

```
    'extensions' => [

        'file-selector' => [
            // Set to `false` if you want to disable this extension
            'enable' => true,
        ]
    ]

```

### 依赖说明(如果已安装，可跳过)

[](#依赖说明如果已安装可跳过)

该插件依赖media-manager插件(如果已经安装并配置过该插件，可以忽略) 以下是对media-manager的操作 本扩展共用media-manager的配置，如已发布，可跳过

1. 发布media-manager的文件 ```
    php artisan admin:import media-manager

    ```
2. 配置config/admin.php文件的 ```
    'extensions' => [

        'media-manager' => [

            // Select a local disk that you configured in `config/filesystem.php`
            'disk' => 'public'
        ],
    ],

    ```

### 使用方法

[](#使用方法)

在你使用的form组件中，直接使用就行了

1. 简单使用，默认使用的是radio的单选和跟路径的目录，使用实例如下 ```
    $form->media('photo', __('Photo'));

    ```
2. 指定多选，如果需要多选图片的话，可以指定type的值。如： ```
    $form->media('photo', __('Photo'))->type('checkbox');

    ```
3. 指定文件目录，如果需要指定文件目录的话，可以指定path的值。如： ```
    $form->media('photo', __('Photo'))->path('article');

    ```

> 提示
> 本插件不支持多级目录，也不支持目录选择

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

5

Last Release

2280d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5113126?v=4)[houxin](/maintainers/houxin)[@houxin](https://github.com/houxin)

---

Top Contributors

[![hxsen](https://avatars.githubusercontent.com/u/41824387?v=4)](https://github.com/hxsen "hxsen (7 commits)")

---

Tags

extensionlaravel-admin

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/hxsen-file-selector/health.svg)

```
[![Health](https://phpackages.com/badges/hxsen-file-selector/health.svg)](https://phpackages.com/packages/hxsen-file-selector)
```

###  Alternatives

[dianwoung/large-file-upload

An extension of laravel-admin for uploading large files

7747.3k2](/packages/dianwoung-large-file-upload)[laravel-admin-ext/file-browser

A file browser for laravel-admin

153.0k](/packages/laravel-admin-ext-file-browser)[catlane/chunk-file-upload

文件上传小扩展，可支持大文件分块分片上传到七牛云or本地，优化您上传大文件的苦恼

284.9k](/packages/catlane-chunk-file-upload)[jxlwqq/file-manager

file manager for laravel-admin

1115.8k](/packages/jxlwqq-file-manager)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
