1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-23 08:14:10 +00:00

Add url() method to Media model

This commit is contained in:
Daniel Supernault 2018-05-19 20:59:59 -06:00
parent 05df1c6a5f
commit cb0780898e

View file

@ -3,8 +3,14 @@
namespace App; namespace App;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use Storage;
class Media extends Model class Media extends Model
{ {
// public function url()
{
$path = $this->media_path;
$url = Storage::url($path);
return url($url);
}
} }