Laravel-Mediable is a package for easily uploading and attaching media files to models with Laravel 5.

Overview

Laravel-Mediable

Coveralls StyleCI Packagist

Laravel-Mediable is a package for easily uploading and attaching media files to models with Laravel.

Features

  • Filesystem-driven approach is easily configurable to allow any number of upload directories with different accessibility. Easily restrict uploads by MIME type, extension and/or aggregate type (e.g. image for JPEG, PNG or GIF).
  • Many-to-many polymorphic relationships allow any number of media to be assigned to any number of other models without any need to modify their schema.
  • Attach media to models with tags, in order to set and retrieve media for specific purposes, such as 'thumbnail', 'featured image', 'gallery' or 'download'.
  • Integrated support for integration/image for manipulating image files to create variants for different use cases.

Example Usage

Upload a file to the server, and place it in a directory on the filesystem disk named "uploads". This will create a Media record that can be used to refer to the file.

$media = MediaUploader::fromSource($request->file('thumb'))
	->toDestination('uploads', 'blog/thumbnails')
	->upload();

Attach the Media to another eloquent model with one or more tags defining their relationship.

$post = Post::create($this->request->input());
$post->attachMedia($media, ['thumbnail']);

Retrieve the media from the model by its tag(s).

$post->getMedia('thumbnail')->first()->getUrl();

Installation

Add the package to your Laravel app using composer

composer require plank/laravel-mediable

Register the package's service provider in config/app.php. In Laravel versions 5.5 and beyond, this step can be skipped if package auto-discovery is enabled.

'providers' => [
    ...
    Plank\Mediable\MediableServiceProvider::class,
    ...
];

The package comes with a Facade for the image uploader, which you can optionally register as well. In Laravel versions 5.5 and beyond, this step can be skipped if package auto-discovery is enabled.

'aliases' => [
	...
    'MediaUploader' => Plank\Mediable\MediaUploaderFacade::class,
    ...
]

Publish the config file (config/mediable.php) of the package using artisan.

php artisan vendor:publish --provider="Plank\Mediable\MediableServiceProvider"

Run the migrations to add the required tables to your database.

php artisan migrate

Documentation

Read the documentation here.

License

This package is released under the MIT license (MIT).

About Plank

Plank is a web development agency based in Montreal, Canada.

Comments
  • Implement a source adapter for raw data.

    Implement a source adapter for raw data.

    It adapts a TemporaryFile source which encloses file contents as string, array or stream resource, and stores it in the temp directory until the end of the script

    opened by sebdesign 25
  • Planning for Next Major Version

    Planning for Next Major Version

    Hello to all watchers and contributors (paging @sebdesign),

    With the new year approaching, I think it is time to start planning the next major version of this package. Most pressingly, with PHP 5.6 passing into security-only support tomorrow night, I think it is time to drop support for PHP 5.x branch and fully embrace the new features of PHP 7.x. I will be working on this over the next few weeks, as I have time.

    A new major version presents an opportunity to add any number of other changes that we want to the codebase. So I would like to ask if there are any new features that should be incorporated into the package at the same time. Is there anything that you would like to see built into the package? Are there any methods that should really be moved or renamed? Noticed any code smells that I overlooked? Now is the time to ask.

    Feel free to make any suggestions in this thread. Pull Requests also very much welcome!

    enhancement help wanted 
    opened by frasmage 22
  • $media->getUrl() triggers errors after upgrading to Version 3

    $media->getUrl() triggers errors after upgrading to Version 3

    Several trouble after upgrading to laravel version 6 and laravel-mediable version 3.

    Please note that everything was passing before upgrading to V 3.

    I am testing on local public disk. During test I was accessing $media->getUrl() and facing errors.

    When I do Storage:fake(): Storage::fake(); $uploadedFile = UploadedFile::fake()->image('photo.jpeg', 20, 20);

    I am getting following error (formatted): "message:" "strpos() expects parameter 1 to be string, bool given" "exception:" "Symfony\Component\Debug\Exception\FatalThrowableError" "file:" "/var/www/watchcrunch/vendor/plank/laravel-mediable/src/UrlGenerators/LocalUrlGenerator.php" "line:" 100 "trace-first:" array:3 [ "file" => "/var/www/watchcrunch/vendor/plank/laravel-mediable/src/UrlGenerators/LocalUrlGenerator.php" "line" => 100 "function" => "strpos" ]

    When I don't fake Storage:fake() //Storage::fake(); $uploadedFile = UploadedFile::fake()->image('photo.jpeg', 20, 20);

    I am getting following error (formatted): "message:" "Media file /var/www/watchcrunch/storage/app/public/photos/2019/09/O1TtRmb6kBfBCyQsfCgAXGiBCCFfOubbeoxgH0H2.jpeg is not part of the public path /var/www/watchcrunch/public" "exception:" "Plank\Mediable\Exceptions\MediaUrlException" "file:" "/var/www/watchcrunch/vendor/plank/laravel-mediable/src/Exceptions/MediaUrlException.php" "line:" 26 "trace-first:" array:5 [ "file" => "/var/www/watchcrunch/vendor/plank/laravel-mediable/src/UrlGenerators/LocalUrlGenerator.php" "line" => 44 "function" => "mediaNotPubliclyAccessible" "class" => "Plank\Mediable\Exceptions\MediaUrlException" "type" => "::" ]

    After some further digging I found, my file is not considered as public at all although disk has public visibility and even adding makePublic() during upload.

    Also I guess the issue may be in LocalUrlGenerated function isInWebroot().

    However for S3 driver everything works well as expected.

    Can anyone help? Thanks.

    opened by hasnatbabur 15
  • Return more granular HTTP status codes for MediaUploadException

    Return more granular HTTP status codes for MediaUploadException

    Introduce a HandlesMediaExceptions trait which can be used in the Exception\Handler to return more granular HTTP status codes when a MediaUploadException is thrown.

    I have updated the docs, (spotted a few typos also), but I couldn't get Sphinx to work.

    This can be extended to handle more exceptions like MediaMoveException or MediaUrlException in the future.

    Also it would be interesting if we could throw Illuminate\Validation\ValidationExceptions instead of HttpExceptions in some cases, for better upload validation handling.

    opened by sebdesign 13
  • adds on_duplicate_update

    adds on_duplicate_update

    I thought I'd try to implement #67 as part of hacktoberfest, but I'm not overly happy with it. Any feedback you have would be great.

    List of changes:

    • Added MediaUploader::ON_DUPLICATE_UPDATE + a set method for it.

    • Removed verifyDestination function. I found this function to be confusing as it appears to only check if the file exists and then calls handleDuplicate. However, handleDuplicate should always check if a file exists before doing anything, so I moved the check into the handDuplicate function and removed verifyDestination. As this was a private function, it should not break anyone's code (this was also updated in the MediaUploaderTest).

    • Modified handleDuplicate to now return a Media model. If ON_DUPLICATE_UPDATE is set, it returns the model from the database, else it returns the input parameter $model.

    • Added ON_DUPLICATE_UPDATE case in the handleDuplicate method which deletes the existing file on disk, then finds the existing media and updates the updated_at timestamp. This has to be done as the model is not dirty and thus does not actually save when $media->save() is called.

    • Added test_it_can_update_duplicate_files to test it actually works.

    • Added a function similar to deleteExistingMedia called deleteExistingFile which only deletes the file on disk, rather than the actual Media database record. As this function has the ability to knock the database and file system out of sync, I made it a private function.

    • Last but not least, I added a function named findExistingMediaRecord to find existing media records which point to a position on disk that we are trying to use.

    Docs

    I'll update the docs once I know whether you want this merged or not.

    opened by pet1330 12
  • Intervention Image Integration

    Intervention Image Integration

    Planning to add support for Intervention manipulations while uploading images.

    Currently considering an API like the following:

    MediaUploader::fromSource('example.jpg')
        ->applyManipulations(function(Image $image) {
             $image->resize(300, null);
        }, $quality = null)
        ->upload()
    enhancement 
    opened by frasmage 11
  • Add support for generating temporary urls to the S3UrlGenerator

    Add support for generating temporary urls to the S3UrlGenerator

    Presently this is just proof-of-concept PR, If I can get approval for this I'll add tests/update docs etc.

    So @frasmage how does this look to you? I had contemplated adding a separate getTemporararyUrl method, but I prefer this as I can pass the timestamp through regardless of the driver, and if it's a local driver (local dev) it will just ignore it, and if it's the S3 driver it will generate the temporary url.

    Example usage:

    $media = Media::first(); // Assume this is a non-public S3 hosted file
    $media->getUrl(); // throws MediaUrlException as currently does
    $media->getUrl(now()->addMinutes(5)); // Generates temporary url
    
    opened by hailwood 10
  • copyFrom Function

    copyFrom Function

    This PR adds a new copyFrom() function to the Media object.

    The function behaves like this: It copies the associated file on the disk and assigns it to a Media object.

    For example:

    // lets assume we have a $media object
    
    // now create a new media file
    $newMedia = $media->replicate();
    $newMedia->copyFrom($media, 'new/directory', 'filename');
    

    This copyFrom() will, thereby, copy the file on the disk to /new/directory and update the $newMediato reflect these changes.

    I have already added a test for this scenario

    opened by johannesschobel 10
  • extend media for cast an additional column on model

    extend media for cast an additional column on model

    hi i've add a column on media table (custom_fields) in json format. i would like to cast custom_fields but if i extend the media model the cast is not reconized.

    i've add my new class in config/mediable.php nothin happend.

    how can i do? thanks

    question 
    opened by tkart38 9
  • Get only one media

    Get only one media

    Hi,

    I try to find a method to get only one media on posts collection and not all media attach on each post.

    For exemple :

    A post has many media, all with same tag. I wanna get only one of them. I suppose we need to use the join method, but how ?

    Now a use $posts = Post::with('media')->get();, but I dont wanna all media.

    Thank you.

    question 
    opened by borisdamevin 9
  • TypeError

    TypeError "App\Models\User::Plank\Mediable\{closure}(): Argument #2 ($media) must be of type Plank\Mediable\Media, array given"

    Dear,

    I am having an issue with the retrieval of media. I was originally using version 4.4.2. However after discovering my issue I have updated to version 5.2.1. My issue is present in both versions.

    When calling firstMedia($tags, true) I get a TypeError:

    TypeError App\Models\User::Plank\Mediable\{closure}(): Argument #2 ($media) must be of type Plank\Mediable\Media, array given, called in ...

    I am saving the media as follows:

        public function setProfileImage(UploadedFile $image)
        {
            config(['mediable.model' => Media::class]);
            $media = MediaUploader::fromSource($image->getRealPath())
                ->toDisk('avatars')
                ->toDirectory("profile/")
                ->useFilename('profile_' . $this->id)
                ->onDuplicateUpdate()
                ->upload();
            $this->syncMedia($media, ['user', 'profile']);
    
            return $media;
        }
    

    I am retrieving the profile image as follows:

     public function getProfileImage()
        {
            config(['mediable.model' => Media::class]);
            $image = $this->firstMedia(['user', 'profile'], true);
            return $image;
        }
    

    I have also tried the getMedia and getMediaMatchAll methods. Both give the same TypeError. I am using Laravel in combination with Tailwind, Alpine and Livewire. I am getting the error when when my livewire components are updated, for example when switching a tab on the page.

    Does anybody know where I could be making an error causing this issue?

    Thank you in advance for your help!

    opened by SimondeJong-VinvuSoftware 8
  • Cannot upload to S3, no errors.

    Cannot upload to S3, no errors.

    I cannot upload a file to S3. S3 is configured correctly as this does work:

    Storage::disk('s3')->put('uploads', $request->file('image'));
    

    But this does not work (and no error message either):

    MediaUploader::fromSource($request->file('image'))->toDisk('s3')->upload();
    

    Also note, this does work when uploading locally.

    Config:

    <?php
    
    return [
        /*
         * FQCN of the model to use for media
         *
         * Should extend `Plank\Mediable\Media`
         */
        'model' => App\Models\Media::class,
    
        /*
         * Name to be used for mediables joining table
         */
        'mediables_table' => 'mediables',
    
        /*
         * Filesystem disk to use if none is specified
         */
        'default_disk' => 's3',
    
        /*
         * Filesystems that can be used for media storage
         *
         * Uploader will throw an exception if a disk not in this list is selected
         */
        'allowed_disks' => [
            'public',
            's3',
        ],
    
        /*
         * The maximum file size in bytes for a single uploaded file
         */
        'max_size' => 1024 * 1024 * 8,
    
        /*
         * What to do if a duplicate file is uploaded.
         *
         * Options include:
         *
         * * `'increment'`: the new file's name is given an incrementing suffix
         * * `'replace'` : the old file and media model is deleted
         * * `'error'`: an Exception is thrown
         */
        'on_duplicate' => Plank\Mediable\MediaUploader::ON_DUPLICATE_ERROR,
    
        /*
         * Reject files unless both their mime and extension are recognized and both match a single aggregate type
         */
        'strict_type_checking' => false,
    
        /*
         * Reject files whose mime type or extension is not recognized
         * if true, files will be given a type of `'other'`
         */
        'allow_unrecognized_types' => false,
    
        /*
         * Only allow files with specific MIME type(s) to be uploaded
         */
        'allowed_mime_types' => [],
    
        /*
         * Only allow files with specific file extension(s) to be uploaded
         */
        'allowed_extensions' => [],
    
        /*
         * Only allow files matching specific aggregate type(s) to be uploaded
         */
        'allowed_aggregate_types' => [
            Plank\Mediable\Media::TYPE_IMAGE,
        ],
    
        /*
         * List of aggregate types recognized by the application
         *
         * Each type should list the MIME types and extensions
         * that should be recognized for the type
         */
        'aggregate_types' => [
            Plank\Mediable\Media::TYPE_IMAGE => [
                'mime_types' => [
                    'image/jpeg',
                    'image/png',
                    'image/gif',
                ],
                'extensions' => [
                    'jpg',
                    'jpeg',
                    'png',
                    'gif',
                ]
            ],
            Plank\Mediable\Media::TYPE_IMAGE_VECTOR => [
                'mime_types' => [
                    'image/svg+xml',
                ],
                'extensions' => [
                    'svg',
                ]
            ],
            Plank\Mediable\Media::TYPE_PDF => [
                'mime_types' => [
                    'application/pdf',
                ],
                'extensions' => [
                    'pdf',
                ]
            ],
            Plank\Mediable\Media::TYPE_AUDIO => [
                'mime_types' => [
                    'audio/aac',
                    'audio/ogg',
                    'audio/mpeg',
                    'audio/mp3',
                    'audio/mpeg',
                    'audio/wav'
                ],
                'extensions' => [
                    'aac',
                    'ogg',
                    'oga',
                    'mp3',
                    'wav',
                ]
            ],
            Plank\Mediable\Media::TYPE_VIDEO => [
                'mime_types' => [
                    'video/mp4',
                    'video/mpeg',
                    'video/ogg',
                    'video/webm'
                ],
                'extensions' => [
                    'mp4',
                    'm4v',
                    'mov',
                    'ogv',
                    'webm'
                ]
            ],
            Plank\Mediable\Media::TYPE_ARCHIVE => [
                'mime_types' => [
                    'application/zip',
                    'application/x-compressed-zip',
                    'multipart/x-zip',
                ],
                'extensions' => [
                    'zip',
                ]
            ],
            Plank\Mediable\Media::TYPE_DOCUMENT => [
                'mime_types' => [
                    'text/plain',
                    'application/plain',
                    'text/xml',
                    'text/json',
                    'application/json',
                    'application/msword',
                    'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
                ],
                'extensions' => [
                    'doc',
                    'docx',
                    'txt',
                    'text',
                    'xml',
                    'json',
                ]
            ],
            Plank\Mediable\Media::TYPE_SPREADSHEET => [
                'mime_types' => [
                    'application/vnd.ms-excel',
                    'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
                ],
                'extensions' => [
                    'xls',
                    'xlsx',
                ]
            ],
            Plank\Mediable\Media::TYPE_PRESENTATION => [
                'mime_types' =>
                [
                    'application/vnd.ms-powerpoint',
                    'application/vnd.openxmlformats-officedocument.presentationml.presentation',
                    'application/vnd.openxmlformats-officedocument.presentationml.slideshow'
                ],
                'extensions' =>
                [
                    'ppt',
                    'pptx',
                    'ppsx',
                ]
            ],
        ],
    
        /*
         * List of adapters to use for various source inputs
         *
         * Adapters can map either to a class or a pattern (regex)
         */
        'source_adapters' => [
            'class' => [
                Symfony\Component\HttpFoundation\File\UploadedFile::class => Plank\Mediable\SourceAdapters\UploadedFileAdapter::class,
                Symfony\Component\HttpFoundation\File\File::class => Plank\Mediable\SourceAdapters\FileAdapter::class,
                Psr\Http\Message\StreamInterface::class => Plank\Mediable\SourceAdapters\StreamAdapter::class,
            ],
            'pattern' => [
                '^https?://' => Plank\Mediable\SourceAdapters\RemoteUrlAdapter::class,
                '^/' => Plank\Mediable\SourceAdapters\LocalPathAdapter::class,
                '^[a-zA-Z]:\\\\' => Plank\Mediable\SourceAdapters\LocalPathAdapter::class
            ],
        ],
    
        /*
         * List of URL Generators to use for handling various filesystem drivers
         *
         */
        'url_generators' => [
            'local' => Plank\Mediable\UrlGenerators\LocalUrlGenerator::class,
            's3' => Plank\Mediable\UrlGenerators\S3UrlGenerator::class,
        ],
    
        /**
         * Should mediable instances automatically reload their media relationships after modification are made to a tag.
         *
         * If true, will automatically reload media the next time `getMedia()`, `getMediaMatchAll()` or `getAllMediaByTag()` are called.
         */
        'rehydrate_media' => true,
    
        /**
         * Detach associated media when mediable model is soft deleted.
         */
        'detach_on_soft_delete' => false,
    
        /**
         * Variant sizes.
         */
        'variants' => [
            'x-small' => 500,
            'small' => 750,
            'medium' => 1000,
            'large' => 1500,
            'x-large' => 2000,
        ]
    ];
    
    opened by panthro100 4
  • Added alt field

    Added alt field

    Added "ALT" field for medias , I customize the Mediable for every project of mine so i decide to open a pull request , it is so useful for images and videos on websites . Please consider it .

    major 
    opened by zmilad97 3
  • Changes to suport foreignId()'s reliance on unsignedBigInteger

    Changes to suport foreignId()'s reliance on unsignedBigInteger

    Migration was failing with unsigned integer definition for foreign key. It might be better to use foreignId() instead of the more verbose foreign()->references()->on() syntax, but this was the smallest changeset that fixes migration for me.

    major 
    opened by selfsimilar 1
  • Manipulating uploaded file?

    Manipulating uploaded file?

    Hi,

    I'd like to manipulate an uploaded file right away. For example: changing the file format from jpg to webp.

    From what I gather you need to first store the uploaded file, then create a variant and promote it to original status and then remove the old file.

    I'm looking to do that in one step right off the bat. Is that possible?

    opened by LaravelFreelancerNL 2
  • Feature Question:

    Feature Question:

    Hi all, I love what you have done and this fits my needs very well as I need the many-to-many functionality that is provided. However, there are a couple of features from MediaLibrary that I like:

    • Responsive Images (https://spatie.be/docs/laravel-medialibrary/v8/responsive-images/getting-started-with-responsive-images)
    • Optimization (https://spatie.be/docs/laravel-medialibrary/v8/converting-images/optimizing-converted-images)

    I did not see anything like this currently in the project. Have I missed them, and if not, are they on the roadmap by chance?

    Thanks, Gary

    enhancement 
    opened by gn0rt0n 2
Releases(5.8.0)
  • 5.8.0(Jan 3, 2023)

    What's Changed

    • Pass media to manipulation callback by @frasmage in https://github.com/plank/laravel-mediable/pull/299
    • Support scoped disk driver by @frasmage in https://github.com/plank/laravel-mediable/pull/300

    Full Changelog: https://github.com/plank/laravel-mediable/compare/5.7.0...5.8.0

    Source code(tar.gz)
    Source code(zip)
  • 5.7.0(Nov 22, 2022)

    What's Changed

    • Allow database access using a user-defined connection by @giant-robot in https://github.com/plank/laravel-mediable/pull/297

    New Contributors

    • @giant-robot made their first contribution in https://github.com/plank/laravel-mediable/pull/297

    Full Changelog: https://github.com/plank/laravel-mediable/compare/5.6.0...5.7.0

    Source code(tar.gz)
    Source code(zip)
  • 5.6.0(Jun 25, 2022)

    • When defining image variants, it is now possible to pass one or more tags as a third argument
    • Added ImageManipulator::getVariantDefinitionsByTag() and ImageManipulator::getVariantNamesByTag() to more easily retrieve a group of variants intended for a specific purpose
    • Added ImageManipulator::getAllVariantDefinitions() and ImageManipulator::getAllVariantNames()
    • Fixed MediaUploader::import() not working if the extension of the existing file is uppercase.
    Source code(tar.gz)
    Source code(zip)
  • 5.5.0(May 10, 2022)

    • Filename and pathname sanitization will use the app locale when transliterating UTF-8 characters to ascii.
    • Restored original behaviour of treating unrecognized mime types as application/octet-stream (changed in recent version of Flysystem)
    Source code(tar.gz)
    Source code(zip)
  • 5.4.1(Apr 7, 2022)

  • 5.4.0(Feb 12, 2022)

    • Added support for Laravel 9
    • Dropped support for PHP 7.3
    • Dropped support for Laravel 6.x and 7.x
    • Fixed S3 temporary URL generation not respecting disk root configuration.
    Source code(tar.gz)
    Source code(zip)
  • 5.3.1(Dec 11, 2021)

  • 5.2.1(Oct 28, 2021)

  • 5.2.0(Sep 8, 2021)

  • 5.1.1(Apr 30, 2021)

  • 5.1.0(Apr 29, 2021)

    • Added MediaUploader::onDuplicateReplaceWithVariants() which behaves similar to onDuplicateReplace() but will also delete any variants of the replaced Media record.
    • Fixed onDuplicateUpdate() failing if file exists but without a matching model.
    Source code(tar.gz)
    Source code(zip)
  • 5.0.7(Dec 12, 2020)

  • 5.0.6(Dec 5, 2020)

  • 5.0.5(Dec 5, 2020)

    • ImageManipulator now uses $media->contents() instead of $media->stream(), as Intervention Image loads the whole file into memory anyways, and the former seems to have fewer hiccups for various cloud filesystems.
    Source code(tar.gz)
    Source code(zip)
  • 5.0.4(Dec 3, 2020)

  • 5.0.3(Oct 29, 2020)

  • 5.0.2(Oct 23, 2020)

  • 5.0.1(Oct 22, 2020)

  • 5.0.0(Oct 15, 2020)

    • Added support for creating image variants using the intervention/image library. Variants can be created synchronously in the current process or asychronously as queued jobs. Media records keep track of variants created from them.
    • Fixed Laravel 8+ migration squashing. Database migrations are now loaded from within the package instead of copied to the application's database/migration directory. See UPGRADING.md for steps to avoid conflicts.
    • Directory and filename validation now only allows URL and filesystem safe ASCII characters (alphanumeric plus ., -, _, and / for directories). Will automatically attempt to transliterate UTF-8 accented characters and ligatures into their ASCII equivalent, all other characters will be converted to hyphens.
    • Added Media::stream() method to easily retrieve a PSR-7 compatible Stream.
    • Added support for generating temporary URLs for files hosted on Amazon S3 buckets.
    Source code(tar.gz)
    Source code(zip)
  • 4.4.2(Sep 27, 2020)

  • 4.4.1(Sep 14, 2020)

  • 4.4.0(Sep 9, 2020)

  • 4.3.2(Aug 17, 2020)

    • Fix composer version constraint of league/flysystem to allow minor version bumps
    • Removed redundant index from the Media table database migration
    Source code(tar.gz)
    Source code(zip)
  • 4.3.1(Jul 30, 2020)

  • 4.3.0(Jul 28, 2020)

  • 4.2.3(Jun 3, 2020)

    • The Media::$size property is now cast as int, fixing a TypeError. (Thanks @boumanb!)
    • Fixed RemoteUrlAdapter, StreamAdapter, and StreamResourceAdapter potentially returning an incorrect filename and/or extension if the query params of the URL contains certain characters.
    Source code(tar.gz)
    Source code(zip)
  • 4.2.2(May 14, 2020)

  • 4.2.1(Mar 11, 2020)

  • 4.2.0(Mar 7, 2020)

  • 4.1.0(Feb 29, 2020)

    • Fixed the timing of the beforeSave callback. Now occurs before onDuplicate validation occurs. This allows the callback to be used to determine where to place the file
    • The beforeSave callback is now called triggered by the MediaUploader::replace() and MediaUploader::import() methods as well
    Source code(tar.gz)
    Source code(zip)
Owner
Plank Design
Plank Design
Eloquent Befriended brings social media-like features like following, blocking and filtering content based on following or blocked models.

Laravel Befriended Eloquent Befriended brings social media-like features like following, blocking and filtering content based on following or blocked

Renoki Co. 720 Jan 3, 2023
🖼️ Laravel Nova Field for uploading and cropping images using Slim Image Cropper

??️ Laravel Nova Field for uploading and cropping images using Slim Image Cropper

Marius 5 Apr 2, 2022
This package allows you to easily work with NanoID in your Laravel models.

Laravel Model UUIDs Introduction Huge thanks to Micheal Dyrynda, whose work inspired me to create this package based on laravel-model-nanoid but uses

Parables Boltnoel 3 Jul 27, 2022
A Laravel package for attachment files to models

Laravel attachmentable package A package for attachment files to models Installation Run the command below to add this package: composer require larav

Laravel Iran Community 4 Jan 18, 2022
Easily add all the 58 Algerian Wilayas and its Dairas to your cool Laravel project (Migrations, Seeders and Models).

Laravel-Algereography Laravel-Algereography allows you to add Migrations, Seeders and Models of Algerian Wilayas and Dairas to your existing or new co

Hocine Saad 48 Nov 25, 2022
Flow package to synchronize metadata and binary data of imported Neos.Media assets

Wwwision.AssetSync Flow package to synchronize metadata and resources of imported Neos.Media assets Installation Install this package via: composer re

Bastian Waidelich 5 Feb 7, 2022
Generate trends for your models. Easily generate charts or reports.

Laravel Trend Generate trends for your models. Easily generate charts or reports. Support us Like our work? You can support us by purchasing one of ou

Flowframe 139 Dec 27, 2022
A laravel package to generate class files from stub files.

Laravel Stub Generator A php laravel package to generate useable php files from given stub files . Installation Require the package using composer: co

Touhidur Rahman 31 Dec 29, 2022
A Laravel package that allows you to use multiple ".env" files in a precedent manner. Use ".env" files per domain (multi-tentant)!

Laravel Multi ENVs Use multiple .envs files and have a chain of precedence for the environment variables in these different .envs files. Use the .env

Allyson Silva 48 Dec 29, 2022
MediaDB is a web-based media streaming service written in Laravel and Vue.

MediaDB (API) MediaDB is a web-based media streaming service written in Laravel and Vue. The nginx-vod-module is used for on-the-fly repackaging of MP

François M. 53 Sep 3, 2022
Laravel API wrapper to interact fluently with your Janus Media Server

Laravel API wrapper to interact fluently with your Janus Media Server. Core server interactions, as well as the video room plugin included.

Richard  Tippin 11 Aug 21, 2022
This is a simple caricatur media platform using laravel 7.2.0

Laravel Caricatur Platform This is a simple caricatur media platform using laravel 7.2.0 Screenshot Getting started Launch the project (Assuming you'v

Abdurrahman Gazi DİŞ 0 Nov 16, 2022
A media picker plugin for Filament Admin.

Filament Curator A media picker plugin for Filament Admin. ‼️ This package is still in development ‼️ This package does not work with Spatie Media Lib

Adam Weston 84 Jan 7, 2023
Open source for selling social media accounts or accounts on other platforms.

SELLACC - Open Source Selling Accounts SELLACC is open source for selling social media accounts or accounts on other platforms. ⚠️ We not update sourc

PHAM DUC THANH 6 Nov 17, 2022
File & Folders & Media Browser With Code Editor

Filament Browser File & Folders & Media Browser With Code Editor Features File Browser Code Editor with highlights Media Viewer .Env Editor Screenshot

Fady Mondy 23 Jan 5, 2023
A Laravel package making a diagram of your models, relations and the ability to build them with it

Laravel Schematics This package allows you to make multiple diagrams of your Eloquent models and their relations. It will help building them providing

Maarten Tolhuijs 1.4k Dec 31, 2022
Package with small support traits and classes for the Laravel Eloquent models

Contains a set of traits for the eloquent model. In future can contain more set of classes/traits for the eloquent database.

Martin Kluska 3 Feb 10, 2022
The package lets you generate TypeScript interfaces from your Laravel models.

Laravel TypeScript The package lets you generate TypeScript interfaces from your Laravel models. Introduction Say you have a model which has several p

Boris Lepikhin 296 Dec 24, 2022
A Laravel package for multilingual models

Introduction If you want to store translations of your models into the database, this package is for you. This is a Laravel package for translatable m

Astrotomic 974 Dec 23, 2022