123456789101112131415161718192021 |
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\Model;
- class UsefulCount extends Model
- {
- protected $table = 'useful_count';
- protected $primaryKey = 'id';
- const CREATED_AT = 'creation_date';
- public static function getInfo(int $problem_id)
- {
- return self::query()->where('problem_id', $problem_id)->first();
- }
- public static function insertData(array $data)
- {
- return self::query()->insert($data);
- }
- }
|