npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@priom7/laravel2doc

v1.0.2

Published

Automatically generate comprehensive documentation for Laravel applications

Readme

Laravel2Doc

Automatically generate comprehensive documentation for Laravel applications, including Entity Relationship Diagrams (ERD), UML Class Diagrams, Sequence Diagrams, API Documentation, and more.

Features

  • 📊 Entity Relationship Diagrams (ERD): Visual representation of your database schema
  • 📝 UML Class Diagrams: Object-oriented view of your models and their relationships
  • 🔄 Sequence Diagrams: Flow of interactions between components
  • 📚 API Documentation: Comprehensive documentation of your API endpoints
  • 🚀 Interactive Interface: Browse all documentation through a user-friendly web interface
  • 🔍 Automatic Analysis: No configuration needed - just install and run

Installation

Global Installation

npm install -g @priom7/laravel2doc

Local Installation (within a Laravel project)

cd your-laravel-project
npm install @priom7/laravel2doc

Usage

Within a Laravel Project

Navigate to your Laravel project root directory and run:

npx laravel2doc

This will analyze your Laravel project and generate documentation in the laravel2doc directory. It will also start a web server to view the documentation.

Options

  • -p, --port <number>: Port to serve documentation on (default: 3333)
  • -o, --output <dir>: Output directory (default: 'laravel2doc')

Demo Mode

If you run Laravel2Doc outside a Laravel project, it will generate example documentation to demonstrate its features:

npx laravel2doc

Generated Documentation

Laravel2Doc generates the following documentation:

Entity Relationship Diagrams (ERD)

  • Database tables with columns and data types
  • Primary keys and foreign keys
  • Relationships between tables

UML Class Diagrams

  • Models with properties and methods
  • Relationships between models
  • Inheritance hierarchies

Sequence Diagrams

  • Controller actions and their interactions
  • Common operations like create, read, update, delete
  • Flow of data between components

API Documentation

  • Endpoints with HTTP methods
  • Controller handlers and parameters
  • Route definitions

How It Works

Laravel2Doc analyzes your Laravel project by:

  1. Scanning model files to extract relationships and properties
  2. Analyzing migrations to build database schema
  3. Parsing controllers to understand application flow
  4. Examining route files to document API endpoints
  5. Generating interactive documentation with Mermaid diagrams

Requirements

  • Node.js 14+
  • Laravel 8+ project (for Laravel-specific documentation)

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author

Created by priom7