salesentry filters
This commit is contained in:
@ -7,6 +7,7 @@ interface StockInterface
|
||||
public function findAll();
|
||||
public function getStockById($StockId);
|
||||
public function getStockByEmail($email);
|
||||
public function getStocksByProduct($productId);
|
||||
public function delete($StockId);
|
||||
public function create($StockDetails);
|
||||
public function update($StockId, array $newDetails);
|
||||
|
@ -23,6 +23,11 @@ class StockRepository implements StockInterface
|
||||
return Stock::where('email', $email)->first();
|
||||
}
|
||||
|
||||
public function getStocksByProduct($productId)
|
||||
{
|
||||
return Stock::where('product_id', $productId)->pluck('title', 'id');
|
||||
}
|
||||
|
||||
public function delete($StockId)
|
||||
{
|
||||
Stock::destroy($StockId);
|
||||
|
Reference in New Issue
Block a user