You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

20 lines
499 B

<?php
namespace App;
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);
}
}