25 lines
532 B
PHP
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();
|
|
}
|
|
} |