PostRepository.php 491 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
<?php

namespace App\Repositories\Webprofile\Zh;

use App\Models\Webprofile\Zh\Posts;
use App\Repositories\Repository;

class PostRepository extends Repository
{
    public function __construct(Posts $model)
    {
        $this->model = $model;
    }

    public function get()
    {
    }

    public function paginate()
    {
    }

    public function update($data, $post)
    {
        return $this->model->updateOrCreate([
            'post_id' => $post->id,
        ], $data);
    }
}