changes
This commit is contained in:
9
app/Repositories/Interface/PopupInterface.php
Normal file
9
app/Repositories/Interface/PopupInterface.php
Normal file
@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace App\Repositories\Interface;
|
||||
|
||||
interface PopupInterface
|
||||
{
|
||||
public function create(array $popupDetail);
|
||||
public function update($popupId, array $newDetails);
|
||||
}
|
19
app/Repositories/PopupRepository.php
Normal file
19
app/Repositories/PopupRepository.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Repositories;
|
||||
|
||||
use App\Models\Popups;
|
||||
use App\Repositories\Interface\PopupInterface;
|
||||
|
||||
class PopupRepository implements PopupInterface
|
||||
{
|
||||
public function create(array $popupDetail)
|
||||
{
|
||||
Popups::create($popupDetail);
|
||||
}
|
||||
|
||||
public function update($popupId, array $newDetails)
|
||||
{
|
||||
return Popups::where('id', $popupId)->update($newDetails);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user