mlusas/laravel-loom-updates 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

mlusas/laravel-loom-updates

Composer 安装命令:

composer require mlusas/laravel-loom-updates

包简介

A Laravel package for tracking Loom video updates in your codebase

README 文档

README

Latest Version on Packagist Total Downloads License

Who is this for?

Laravel Loom Updates is designed for Laravel developers who:

  • Want to enhance their code documentation with video explanations
  • Need to manage and track Loom videos used throughout their codebase
  • Aim to improve onboarding processes for new team members
  • Desire a centralized way to view and manage code-related video content

If you're using Loom to create video explanations for your code and want an easy way to manage these videos within your Laravel project, this package is for you!

Jump to use cases

What is Laravel Loom Updates?

Laravel Loom Updates is a package that helps you track and manage Loom video links in your Laravel project's codebase. It provides tools to scan your code for Loom URLs, store them in a database, and display them in a user-friendly interface.

Features

  • Scan your Laravel project for Loom video URLs
  • Option to see list of Loom videos in Command Line or Web Browser
  • Store Loom video metadata in your database
  • Display Loom videos in a clean, responsive interface
  • Artisan commands for easy management of Loom URLs
  • Configurable file scanning options

Installation

You can install the package via composer:

composer require mlusas/laravel-loom-updates

After installation, run the migrations to create the necessary database table:

php artisan migrate

Configuration

Publish the configuration file:

php artisan vendor:publish --provider="mlusas\LaravelLoomUpdates\LoomUpdatesServiceProvider" --tag="config"

This will create a config/loom-updates.php file where you can modify the package settings:

return [
    'use_database' => true,
    'scan_directories' => [
        app_path(),
        resource_path(),
    ],
    'file_extensions' => ['php', 'js', 'ts', 'vue'],
];
  • use_database: Set to true to store Loom URLs in the database, or false to only scan files without storing.
  • scan_directories: An array of directories to scan for Loom URLs.
  • file_extensions: An array of file extensions to scan for Loom URLs.

Usage

Adding Loom URLs to Your Code

You can add Loom URLs to your code using the following format:

/**
 * @loom https://www.loom.com/share/your-video-id YYYY-MM-DD author "new Feature"
 */
  • YYYY-MM-DD: The date the video was created
  • author: The name of the person who created the video
  • tag: A custom tag for categorizing the video (optional, enclosed in double quotes)

Example:

/**
 * @loom https://www.loom.com/share/1234567890abcdef 2023-09-27 John.Doe "bug"
 */
class ComplexAlgorithm
{
    // ...
}

Scanning for Loom URLs

To scan your project for Loom URLs and store them in the database (if use_database is true), run:

php artisan loom:store

Listing Loom URLs

To list all Loom URLs found in your codebase, use:

php artisan loom:list

You can also filter by timeframe:

php artisan loom:list --timeframe=week

Timeframe options include:

  • "day"
  • "week"
  • "month"

Note: This command will always scan your files in real-time. If use_database is set to true, it will also check the database for any stored URLs.

The output will include the URL, file path, line number, author, date, and tag for each Loom URL found.

Viewing Loom Videos

To view the Loom videos in a web interface, add the following route to your routes/web.php file:

Route::get('/loom-videos', function () {
    $loomUrls = \mlusas\LaravelLoomUpdates\Models\LoomUrl::all();
    return view('loom-updates::loom-viewer', compact('loomUrls'));
})->name('loom-videos');

Then visit /loom-videos in your browser.

Tip: include the loom:store command in your CI/CD to scan, store, and show changes when pushed to staging or production.

Here's a preview of what the Loom viewer interface looks like:

Loom Viewer Interface

Use Cases

  1. Code Documentation: Explain complex parts of your codebase with Loom videos.
  2. Onboarding New Developers: Help new team members understand the codebase quickly.
  3. Feature Demonstrations: Demonstrate new features or changes in the project.
  4. Bug Reporting: Visually report and explain bugs in the system.
  5. Code Review Explanations: Provide detailed explanations for code reviews.
  6. Architecture Overviews: Give high-level explanations of system architecture.

Back to top

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for details.

Testing

composer test

Security

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

Credits

License

The GNU General Public License v3.0 (GPLv3). Please see License File for more information.

mlusas/laravel-loom-updates 适用场景与选型建议

mlusas/laravel-loom-updates 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 105 次下载、GitHub Stars 达 2, 最近一次更新时间为 2024 年 09 月 28 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 mlusas/laravel-loom-updates 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 mlusas/laravel-loom-updates 我们能提供哪些服务?
定制开发 / 二次开发

基于 mlusas/laravel-loom-updates 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2024-09-28