paginate(20); } public function getStockLocationById($StockLocationId) { return StockLocation::findOrFail($StockLocationId); } public function getStockLocationByEmail($email) { return StockLocation::where('email', $email)->first(); } public function delete($StockLocationId) { StockLocation::destroy($StockLocationId); } public function create($StockLocationDetails) { return StockLocation::create($StockLocationDetails); } public function update($StockLocationId, array $newDetails) { return StockLocation::whereId($StockLocationId)->update($newDetails); } public function pluck() { return StockLocation::pluck('title', 'id'); } }