updatea
This commit is contained in:
34
app/Repositories/VideoRepository.php
Normal file
34
app/Repositories/VideoRepository.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Repositories;
|
||||
|
||||
use App\Models\Videos;
|
||||
use App\Repositories\Interface\VideosInterface;
|
||||
|
||||
|
||||
class VideoRepository implements VideosInterface
|
||||
{
|
||||
public function getAll()
|
||||
{
|
||||
return Videos::where('status','<>', -1)->orderBy('display_order')->get();
|
||||
}
|
||||
|
||||
public function getVideoById($videoId)
|
||||
{
|
||||
return Videos::findOrFail($videoId);
|
||||
}
|
||||
|
||||
public function delete($videoId)
|
||||
{
|
||||
return Videos::destroy($videoId);
|
||||
}
|
||||
|
||||
public function create(array $provinceDetails)
|
||||
{
|
||||
return Videos::create($provinceDetails);
|
||||
}
|
||||
|
||||
public function update($videoId, array $newDetails){
|
||||
return Videos::where('video_id', $videoId)->update($newDetails);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user