media job model
This commit is contained in:
@@ -860,7 +860,7 @@ class Media extends Model
|
||||
$video = $ffmpeg->open($filePath);
|
||||
$frame = $video->frame(TimeCode::fromSeconds(5));
|
||||
$frame->save($tempImagePath);
|
||||
} catch(\Exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
Log::error($e);
|
||||
}
|
||||
|
||||
|
||||
35
app/Models/MediaJob.php
Normal file
35
app/Models/MediaJob.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Traits\Uuids;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class MediaJob extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use Uuids;
|
||||
|
||||
|
||||
/**
|
||||
* Return the job owner
|
||||
*
|
||||
* @return BelongsTo
|
||||
*/
|
||||
public function user(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the media item
|
||||
*
|
||||
* @return BelongsTo
|
||||
*/
|
||||
public function media(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Media::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user