PHPackages                             diepxuan/laravel-support - 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. diepxuan/laravel-support

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

diepxuan/laravel-support
========================

Specifies a brief summary of the PHP package, indicating its purpose as a support tool for developers.

0.1.7(2mo ago)014.2k↓33.3%MITPHP

Since Feb 28Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/diepxuan/laravel-support)[ Packagist](https://packagist.org/packages/diepxuan/laravel-support)[ RSS](/packages/diepxuan-laravel-support/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (2)Versions (5)Used By (0)

Laravel Support
===============

[](#laravel-support)

Package hỗ trợ và tiện ích cho Laravel.

📚 Documentation
---------------

[](#-documentation)

- **Project Docs:** [Serve:Dev Commands](../../docs/project/serve-dev-commands.md) - Development server commands
- **Project Docs:** [Package Namespace Conventions](../../docs/project/package-namespace-conventions.md)

Mô tả ngắn gọn
--------------

[](#mô-tả-ngắn-gọn)

Cung cấp các công cụ hỗ trợ cho developer trong hệ thống DX, bao gồm:

- Mở rộng Collection với tiện ích markdown
- Command quản lý npm tự động
- **Hệ thống serve:dev commands** để quản lý development server (Laravel + Vite)

Chức năng chính
---------------

[](#chức-năng-chính)

### 1. Collection Extension

[](#1-collection-extension)

- Class `Collection` mở rộng từ `Illuminate\Support\Collection`
- Phương thức `toMarkdownTable` chuyển collection thành bảng markdown (hỗ trợ UTF-8, căn chỉnh cột)

### 2. NPM Management Command

[](#2-npm-management-command)

- Command `app:dev:npm` tự động chạy `npm install` (nếu thiếu node\_modules)
- Khởi động `npm run watch` ở background
- Quản lý PID file tránh trùng lặp process
- Tích hợp với Laravel scheduling (tự động chạy mỗi phút)

### 3. Serve:Dev Commands (Development Server)

[](#3-servedev-commands-development-server)

- `serve:dev` - Start Laravel + Vite development servers
- `serve:dev:stop` - Stop development servers
- `serve:dev:status` - Check server status
- `serve:dev:health` - Health check với auto-recovery
- `serve:dev:service` - Systemd service management
- `serve:dev:logs` - View logs real-time

**Xem chi tiết:** [docs/SERVE-DEV-COMMANDS.md](docs/SERVE-DEV-COMMANDS.md)

### 4. Charset Support

[](#4-charset-support)

- Hỗ trợ xử lý charset thông qua dependency php-charset

Cài đặt / Sử dụng
-----------------

[](#cài-đặt--sử-dụng)

```
composer require diepxuan/laravel-support
```

Package không có ServiceProvider, cần đăng ký command thủ công trong `app/Console/Kernel.php`:

```
protected $commands = [
    \Diepxuan\Support\Commands\Npm::class,
    \Diepxuan\Support\Commands\ServeDev::class,
    \Diepxuan\Support\Commands\ServeDevStop::class,
    \Diepxuan\Support\Commands\ServeDevStatus::class,
    \Diepxuan\Support\Commands\ServeDevHealth::class,
    \Diepxuan\Support\Commands\ServeDevService::class,
    \Diepxuan\Support\Commands\ServeDevLogs::class,
];
```

### Sử dụng Collection

[](#sử-dụng-collection)

```
use Diepxuan\Support\Collection;

$collection = new Collection([['name' => 'John', 'age' => 30], ...]);
echo $collection->toMarkdownTable(['name' => 'Tên', 'age' => 'Tuổi']);
```

### Sử dụng NPM Command

[](#sử-dụng-npm-command)

```
php artisan app:dev:npm
```

Command sẽ kiểm tra node\_modules, cài đặt nếu cần, và khởi chạy npm run watch với PID lưu tại `storage/watch.pid`.

### Sử dụng Serve:Dev Commands

[](#sử-dụng-servedev-commands)

```
# Start development server
php artisan serve:dev

# Check status
php artisan serve:dev:status

# Health check with auto-fix
php artisan serve:dev:health --fix

# Install as systemd service
sudo php artisan serve:dev:service install

# Stop servers
php artisan serve:dev:stop
```

**Xem chi tiết:** [docs/SERVE-DEV-COMMANDS.md](docs/SERVE-DEV-COMMANDS.md)

Cấu trúc thư mục
----------------

[](#cấu-trúc-thư-mục)

```
laravel-support/
├── config/
│   └── config.php                 # Cấu hình package
├── src/
│   ├── Collection.php             # Class Collection mở rộng
│   └── Commands/
│       ├── Npm.php                # Command npm tự động
│       ├── ServeDev.php           # Main serve:dev command
│       ├── ServeDevStop.php       # Stop command
│       ├── ServeDevStatus.php     # Status command
│       ├── ServeDevHealth.php     # Health check
│       ├── ServeDevService.php    # Service management
│       └── ServeDevLogs.php       # Log viewer
├── docs/
│   ├── CODE-STYLE-AND-FORMATTING.md
│   └── SERVE-DEV-COMMANDS.md      # Serve:dev documentation
├── .editorconfig
├── .gitignore
├── .php-cs-fixer.dist.php
├── LICENSE
├── README.md
└── composer.json

```

Liên kết đến các package liên quan
----------------------------------

[](#liên-kết-đến-các-package-liên-quan)

- diepxuan/php-charset (xử lý charset)
- diepxuan/laravel-core (core chung)

Tài liệu
--------

[](#tài-liệu)

- [Code Style &amp; Formatting](docs/CODE-STYLE-AND-FORMATTING.md)
- [Serve:Dev Commands](docs/SERVE-DEV-COMMANDS.md)

Ghi chú
-------

[](#ghi-chú)

Package hỗ trợ các tiện ích nhỏ nhưng hữu ích cho quá trình phát triển:

- Command npm tự động giúp duy trì watch mode cho frontend assets
- Collection markdown table hữu ích cho việc generate report trong console
- Serve:dev commands thay thế hoàn toàn external scripts, tích hợp đầy đủ development server management

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance89

Actively maintained with recent releases

Popularity19

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity27

Early-stage or recently created project

 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 ~1 days

Total

4

Last Release

73d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/90fcb59bfa8097c0e0dacd05f43901adb774dc4adb6172b2b743635f8f3d1d2e?d=identicon)[caothu159](/maintainers/caothu159)

---

Top Contributors

[![caothu159](https://avatars.githubusercontent.com/u/4988663?v=4)](https://github.com/caothu159 "caothu159 (21 commits)")

### Embed Badge

![Health badge](/badges/diepxuan-laravel-support/health.svg)

```
[![Health](https://phpackages.com/badges/diepxuan-laravel-support/health.svg)](https://phpackages.com/packages/diepxuan-laravel-support)
```

###  Alternatives

[apen/additional_reports

Useful information in the reports module : xclass, ajax, cliKeys, eID, general status of the system (encoding, DB, php vars...), hooks, compare local and TER extension (diff), used content type, used plugins, ExtDirect... It can really help you during migration or new existing project (to have a global reports of the system).

14157.8k](/packages/apen-additional-reports)

PHPackages © 2026

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