36 lines
818 B
PHP
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);
|
|
}
|
|
|
|
}
|