定制 veiliglanceren/laravel-remote-documentation 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

veiliglanceren/laravel-remote-documentation

最新稳定版本:1.0.0

Composer 安装命令:

composer require veiliglanceren/laravel-remote-documentation

包简介

Easily fetch, parse, and display remote Markdown documentation from GitHub (or other sources) directly into customizable Blade views in your Laravel application.

README 文档

README

Veilig Lanceren

This package is maintained by VeiligLanceren.nl, your partner in website development and everything else to power up your online company.

Laravel Remote Documentation

Latest Version on Packagist Total Downloads License

Easily fetch, parse, and display remote Markdown documentation from GitHub (or other sources) directly into customizable Blade views inside your Laravel application.

✨ Features

  • Fetch remote .md files from public GitHub repositories
  • Convert Markdown to clean HTML
  • Generate Blade templates automatically
  • Fully customizable Blade layouts
  • Service-oriented, extensible, and tested

📦 Installation

Install the package via Composer:

composer require veiliglanceren/laravel-remote-documentation

Laravel will automatically discover the package.
If needed, manually register the ServiceProvider:

Veiliglanceren\LaravelRemoteDocumentation\RemoteDocumentationServiceProvider::class

And the Facade:

'RemoteDocumentation' => Veiliglanceren\LaravelRemoteDocumentation\Facades\RemoteDocumentation::class,

⚡ Quick Usage

Fetch documentation and generate Blade file via command:

php artisan remote-docs:fetch vendor/repository README.md

This will:

  • Fetch the README.md from GitHub vendor/repository
  • Convert it to HTML
  • Save it as a Blade file under resources/views/vendor/remote-documentation/vendor_repository.blade.php

Customize your layout

Override the default layout by publishing the views:

php artisan vendor:publish --tag=remote-documentation-views

You can then edit resources/views/vendor/remote-documentation/layout.blade.php.

🛠 Available functions

The following functions are available through the RemoteDocumentation facade.

Service Purpose
RemoteDocumentation::get($repo, $file) Fetch and parse remote Markdown
RemoteDocumentation::parse($markdown) Generate a Blade view file

All services are fully extensible and injectable for advanced use cases.

✅ Testing

Run the tests using PestPHP:

./vendor/bin/pest

🧪 Pest Compatibility

This package supports:

  • Pest v2 (for Laravel 10)
  • Pest v3 (for Laravel 11 and 12)

Ensure that your Pest version aligns with your Laravel version to maintain compatibility.

📚 Future Roadmap

  • Add feature tests for full command flow
  • Support private repositories with token authentication

📝 License

The MIT License (MIT).
Please see License File for more information.

统计信息

  • 总下载量: 376
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-04-26