2020-06-24 21:49:06 +10:00
|
|
|
<?php
|
|
|
|
|
/**
|
2020-09-06 19:38:10 +10:00
|
|
|
* Invoice Ninja (https://invoiceninja.com).
|
2020-06-24 21:49:06 +10:00
|
|
|
*
|
|
|
|
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
|
|
|
|
*
|
2023-01-29 09:21:40 +11:00
|
|
|
* @copyright Copyright (c) 2023. Invoice Ninja LLC (https://invoiceninja.com)
|
2020-06-24 21:49:06 +10:00
|
|
|
*
|
2021-06-16 16:58:16 +10:00
|
|
|
* @license https://www.elastic.co/licensing/elastic-license
|
2020-06-24 21:49:06 +10:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
namespace App\Repositories;
|
|
|
|
|
|
|
|
|
|
use App\Models\Document;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Class for document repository.
|
|
|
|
|
*/
|
|
|
|
|
class DocumentRepository extends BaseRepository
|
|
|
|
|
{
|
|
|
|
|
public function delete($document)
|
|
|
|
|
{
|
|
|
|
|
$document->deleteFile();
|
|
|
|
|
$document->forceDelete();
|
|
|
|
|
}
|
|
|
|
|
|
2020-06-24 22:12:43 +10:00
|
|
|
public function restore($document)
|
2020-06-24 21:49:06 +10:00
|
|
|
{
|
2022-03-17 13:20:58 +11:00
|
|
|
// if (! $document->trashed()) {
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
2020-06-24 21:49:06 +10:00
|
|
|
|
2022-03-17 13:20:58 +11:00
|
|
|
// $document->restore();
|
2020-06-24 21:49:06 +10:00
|
|
|
}
|
2022-03-17 13:20:58 +11:00
|
|
|
|
|
|
|
|
public function archive($document)
|
|
|
|
|
{
|
2022-06-21 09:57:17 +00:00
|
|
|
}
|
2020-06-24 21:49:06 +10:00
|
|
|
}
|