BinarCode / laravel-restify

The fastest way to make a powerful JSON:API compatible Rest API with Laravel.

Home Page:https://restify.binarcode.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Docs for media is missing a function call to store the media

mahmoudawadeen opened this issue · comments

Existing

$post->addMediaFromRequest('file');

Issue

According to the docs for the media library, you need to use one of the "finishing methods" to store the media. Just calling addMediaFromRequest doesn't store the file.

Suggested

        $post->addMediaFromRequest('file')
            ->toMediaCollection();

Updated! Thank you!