<?php
|
|
namespace App\Repositories;;
|
|
|
|
use App\BilibiliVideos;
|
|
use Illuminate\Support\Facades\DB;
|
|
use Prettus\Repository\Eloquent\BaseRepository;
|
|
|
|
class BilibiliVideoRepository extends BaseRepository{
|
|
function model()
|
|
{
|
|
return "App\\BilibiliVideos";
|
|
// TODO: Implement model() method.
|
|
}
|
|
|
|
public function softLockUpdate($where, $version, $attrs) {
|
|
$where["version"] = $version;
|
|
$attrs["version"] = DB::raw("version + 1");
|
|
return BilibiliVideos::where($where)->update($attrs);
|
|
}
|
|
|
|
}
|