PHPackages                             nayem1108/document-management - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. nayem1108/document-management

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

nayem1108/document-management
=============================

Document management tools

v1.0.1(1y ago)03MITPHPPHP ^7.4|^8.0|^8.1|^8.2

Since Sep 29Pushed 1y ago1 watchersCompare

[ Source](https://github.com/nayem1108/document-management)[ Packagist](https://packagist.org/packages/nayem1108/document-management)[ Docs](https://github.com/nayem1108/document-management)[ RSS](/packages/nayem1108-document-management/feed)WikiDiscussions Master Synced 1mo ago

READMEChangelogDependencies (3)Versions (3)Used By (0)

Very short description of the package
=====================================

[](#very-short-description-of-the-package)

[![Latest Version on Packagist](https://camo.githubusercontent.com/01a68832bc5ecda9ba520b8ee8816db4be76b3c423b70d1bafa12e2b2b3cc776/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e6179656d313130382f646f63756d656e742d6d616e6167656d656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/nayem1108/document-management)[![Total Downloads](https://camo.githubusercontent.com/89e858f0b1f0094dd67f832d131b31289dcc5caddcc9fac3490c16ae307a525b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e6179656d313130382f646f63756d656e742d6d616e6167656d656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/nayem1108/document-management)[![GitHub Actions](https://github.com/nayem1108/document-management/actions/workflows/main.yml/badge.svg)](https://github.com/nayem1108/document-management/actions/workflows/main.yml/badge.svg)

This package provides a comprehensive solution for managing documents within a Laravel application. It includes essential features such as CRUD operations, event handling, and user notifications. Built with modern standards, this package supports PSR-1, PSR-2, and PSR-4, ensuring compatibility and ease of integration with other PHP libraries and frameworks. It is designed to be user-friendly and efficient, making it an ideal choice for developers looking to streamline document management tasks in their applications.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require nayem1108/document-management
```

Usage
-----

[](#usage)

To use the Document Management package, you will need to follow these steps:

1. **Import the Package**: In your controller, import the `Document` model provided by the package:

    ```
    use Nayem1108\DocumentManagement\Models\Document;
    ```
2. **Creating a Document**: You can create a new document using the following code:

    ```
    $document = Document::create([
        'title' => 'Document Title',
        'description' => 'Description of the document',
        'file_path' => 'path/to/document.pdf',
    ]);
    ```
3. **Retrieving Documents**: To retrieve all documents, use:

    ```
    $documents = Document::all();
    ```
4. **Updating a Document**: Update an existing document by finding it first:

    ```
    $document = Document::find($id);
    $document->update([
        'title' => 'Updated Title',
        'description' => 'Updated description',
    ]);
    ```
5. **Deleting a Document**: To delete a document, you can use:

    ```
    $document = Document::find($id);
    $document->delete();
    ```
6. **Using Events**: You can listen for document events (like creation or deletion) in your application:

    ```
    use Nayem1108\DocumentManagement\Events\DocumentCreated;

    Event::listen(DocumentCreated::class, function ($event) {
        // Handle the event (e.g., send a notification)
    });
    ```
7. **Blade View Integration**: In your Blade view, display the documents using DataTables, as previously described.

This package simplifies the management of documents in Laravel, making it easy to perform common operations with just a few lines of code.

### Testing

[](#testing)

To ensure the functionality of the Document Management package, you can run the provided tests using PHPUnit. Follow these steps:

1. **Run Tests**: Execute the following command to run all tests:

    ```
    composer test
    ```
2. **Test Coverage**: To generate a code coverage report, use the following command:

    ```
    composer test-coverage
    ```
3. **Writing Tests**: You can find the test files located in the `tests` directory of the package. To add your own tests, create a new test class extending `Tests\TestCase` and place it in the appropriate directory. Here's an example of a basic test:

    ```
    namespace Nayem1108\DocumentManagement\Tests;

    use Nayem1108\DocumentManagement\Models\Document;
    use Tests\TestCase;

    class DocumentTest extends TestCase
    {
        public function test_document_creation()
        {
            $document = Document::create([
                'title' => 'Test Document',
                'description' => 'A document for testing',
                'file_path' => 'path/to/test-document.pdf',
            ]);

            $this->assertDatabaseHas('documents', [
                'title' => 'Test Document',
            ]);
        }
    }
    ```

This testing framework ensures that your package is working as expected and helps you catch any issues early in the development process. Feel free to explore the existing tests for examples and best practices.

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Nayem uddin](https://github.com/nayem1108)
- [All Contributors](../../contributors)

License
-------

[](#license)

This package is licensed under the MIT License (MIT). You can view the full text of the license in the [License File](LICENSE.md).

By using this package, you agree to comply with the terms outlined in the license.

Laravel Package Boilerplate
---------------------------

[](#laravel-package-boilerplate)

This package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com). The boilerplate provides a solid foundation for developing Laravel packages, ensuring best practices and a structured approach to package development.

Key features of the boilerplate include:

- **Standardized Structure**: Follows PSR standards for autoloading, coding style, and documentation.
- **Testing Setup**: Comes with a testing suite using PHPUnit to ensure your package functions correctly.
- **Easy Integration**: Designed for seamless integration with Laravel applications, making it easy to install and use.
- **Configuration Management**: Provides a straightforward way to manage package configuration settings.

Feel free to explore the boilerplate for additional features and tools that can enhance your package development experience.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

586d ago

PHP version history (2 changes)v1.0.0PHP ^7.4|^8.0

v1.0.1PHP ^7.4|^8.0|^8.1|^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/2da5217a515cbf963e81d1f6112d67aa71a9fe43b181ad20235346081fb26d38?d=identicon)[nayemuf](/maintainers/nayemuf)

---

Top Contributors

[![nayemuf](https://avatars.githubusercontent.com/u/119859626?v=4)](https://github.com/nayemuf "nayemuf (6 commits)")

---

Tags

nayem1108document-management

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/nayem1108-document-management/health.svg)

```
[![Health](https://phpackages.com/badges/nayem1108-document-management/health.svg)](https://phpackages.com/packages/nayem1108-document-management)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M681](/packages/barryvdh-laravel-ide-helper)[illuminate/pipeline

The Illuminate Pipeline package.

9446.6M210](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M856](/packages/illuminate-pagination)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)[illuminate/cookie

The Illuminate Cookie package.

224.3M120](/packages/illuminate-cookie)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
