master_template/app/Repositories/CommentsRepository.php
2024-06-23 17:02:56 +05:45

25 lines
532 B
PHP

<?php
namespace App\Repositories;
use App\Models\Comments;
use App\Repositories\CommentsInterface;
class CommentsRepository implements CommentsInterface
{
public function create(array $Details)
{
// dd($Details);
return Comments::create($Details);
}
public function update($commentId, array $Details)
{
return Comments::where('id', $commentId)->update($Details);
}
public function delete($commentId)
{
return Comments::where('id', $commentId)->delete();
}
}