Download the PHP package basekit-laravel/basekit-laravel-media without Composer

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

Basekit Laravel Media

CI Packagist

Media library for Laravel: files on a Laravel filesystem disk, their metadata in the database, a folder hierarchy for editors, and a Filament admin screen.

Moving a file between folders changes metadata only, so published URLs never break.

๐Ÿ“‹ Contents

๐Ÿงฐ Requirements

โฌ‡๏ธ Installation

Package discovery registers the service provider and runs the migration. Publish it only if you want to own the file:

The admin screen needs Filament:

The screen's stylesheet ships as a Filament asset, so publishing the assets is what puts it on the panel. Run this again after every upgrade:

โš™๏ธ Configuration

Everything lives in config/basekit-laravel-media.php:

Use a public disk so stored files get a web URL. A page stores that URL, so keep the disk alive for as long as pages refer to files on it.

soft_deletes belongs in this file rather than in .env: it decides what deleting means for rows already in the table, so it should not flip with a deploy.

๐Ÿ–ฅ๏ธ The admin screen

Register the plugin on a panel:

The plugin adds a single Media screen that holds the folders and the files together.

๐Ÿ”’ Permissions

By default anyone who can reach the panel can use the media screen โ€” installing the package does not lock an existing panel out of its own library.

To restrict an ability, define a gate and point the ability at it:

The same thing through .env is BASEKIT_MEDIA_VIEW_PERMISSION=manage-media. A null name โ€” the default โ€” allows the ability without asking.

Ability Covers
view Opening the Media screen.
create Upload and New folder.
update Edit, Move, and dragging a file onto a folder.
delete Delete on a file or a folder.

If your application already has a policy on Media or MediaFolder, that policy is asked first and is about the individual row โ€” you do not need to define these gate names as well.

โฌ†๏ธ Uploads

Set uploads.max_size in kilobytes (null falls back to Filament's 12 MB) and uploads.accepted_file_types. Filament checks both what the browser sends and what actually arrives, so a file outside the limits is refused rather than written.

A file is stored at path/folder-slug, under the folder that is open when it is uploaded.

๐Ÿ—‘๏ธ Deleting and restoring

Turning soft deletes off

An application that must not keep user-supplied files after a removal can have every deletion take the row and the file together:

With it off, delete() is a hard delete and there is nothing for restore() to bring back; the confirmation an editor reads says so.

๐Ÿ’ป Using media from your own code

findByStorageValue() matches a stored web URL or path back to its row.

๐ŸŽจ Custom views and translations

They land in resources/views/vendor/basekit-laravel-media and lang/vendor/basekit-laravel-media. The views render standalone and never assume your application's layout.

The stylesheets are not part of that: they are registered as Filament assets from resources/css/dist/, so a published view carries no CSS of its own.

Class names follow BEM with bkm as the package prefix: bkm-tile, bkm-tile__preview, bkm-folder--over. bkm on its own is the prefix, never a block.

๐Ÿšง Limitations

The package does not convert, resize or process files, and it does not read image dimensions.

It does not provide:

๐Ÿงช Development

๐Ÿ“„ License

Basekit Laravel Media is open-source software licensed under the MIT License.


All versions of basekit-laravel-media with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4|^8.5
illuminate/contracts Version ^13
illuminate/database Version ^13
illuminate/filesystem Version ^13
illuminate/support Version ^13
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 basekit-laravel/basekit-laravel-media contains the following files

Loading the files please wait ...