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