StocksNew/Modules/Office/app/Repositories/GeneratorLogBookRepository.php
Sampanna Rimal 53c0140f58 first commit
2024-08-27 17:48:06 +05:45

36 lines
818 B
PHP

<?php
namespace Modules\Office\Repositories;
use Modules\Office\Models\GeneratorLogBook;
class GeneratorLogBookRepository implements GeneratorLogBookInterface
{
public function findAll()
{
return GeneratorLogBook::get();
}
public function getGeneratorLogBookById($generatorLogBookId)
{
return GeneratorLogBook::findOrFail($generatorLogBookId);
}
public function delete($generatorLogBookId)
{
GeneratorLogBook::destroy($generatorLogBookId);
}
public function create(array $generatorLogBookDetails)
{
return GeneratorLogBook::create($generatorLogBookDetails);
}
public function update($generatorLogBookId, array $newDetails)
{
return GeneratorLogBook::where('id', $generatorLogBookId)->update($newDetails);
}
}