承接 the-3labs-team/nova-busy-resource-field 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

the-3labs-team/nova-busy-resource-field

最新稳定版本:v2.0.0

Composer 安装命令:

composer require the-3labs-team/nova-busy-resource-field

包简介

A Laravel Nova field.

README 文档

README

Logo Nova Busy Resource Field by The3LabsTeam

Laravel Nova Busy Resource Field

Latest Version on Packagist Maintainability Total Downloads

Have you ever dreamed of having a mechanism in Laravel Nova that would allow you to know if a resource is occupied by another user?

Introducing Nova Resource Busy Field, the first package for Laravel Nova that lets you know if a resource is occupied by another user.

Demo Nova Busy Resource Field by The3LabsTeam

From the secret labs of The3LabsTeam this is a completely opensource package designed to make life easier for those using Laravel Nova as a multi-user CMS.

🌟 Here are some great features:

  • It is model-agnostic, you can decide which resource will be considered "occupiable"
  • Fully configurable, you can choose the threshold timeout and old logs to be deleted
  • It is native to Laravel Nova, there is only one migration to launch
  • It is fully reversible, no Laravel Nova models and/or views are touched
  • Lets you know from the index of a resource if it is occupied
  • Receive an alert if you enter an edit of a busy resource

Installation

For install this package, in your composer.json add the repository:

composer require the-3labs-team/nova-busy-resource-field

You need to publish the migration file:

php artisan vendor:publish --tag=nova-busy-resource-field-migrations

Remember to launch the migrations:

php artisan migrate

Also, you can publish the config file:

php artisan vendor:publish --tag=nova-busy-resource-field-config

Usage

First you need to make a model "busiable". For example, if you want to make the Article model busiable, you need to add the trait The3labsTeam\NovaBusyResourceField\App\Traits\Busiable to it:

use The3labsTeam\NovaBusyResourceField\App\Traits\Busiable;

class Article extends Model{
    use Busiable;
}

Then, in your Nova resource, you can add the field:

    use The3labsTeam\NovaBusyResourceField\NovaBusyResourceField;


    public function fields(NovaRequest $request)
    {
        return [
            // ...
            
            NovaBusyResourceField::make('')->withMeta([
                'saveEvery' => 30000 // In milliseconds
            ]),
            
            // ...
        ];
    }

For the best experience, you can delete old records in database. For this, you need to add in your App\Console\Kernel, command for delete old records every minute.

    $schedule->command('nova-busy-resource-field:run')->everyMinute()->withoutOverlapping();

Sponsor

Tom's Hardware - Notizie, recensioni, guide all'acquisto e approfondimenti per tutti gli appassionati di computer, smartphone, videogiochi, film, serie tv, gadget e non solo Spaziogames - Tutto sul mondo dei videogiochi. Troverai tantissime anteprime, recensioni, notizie dei giochi per tutte le console, PC, iPhone e Android.
Cpop - News, recensioni, guide su fumetto, cinema & serie TV, gioco da tavolo e di ruolo e collezionismo. Tutto quello di cui hai bisogno per rimanere aggiornato sul mondo della cultura pop Data4Biz - Sito dedicato alla trasformazione digitale del business
SOS Home & Garden - Realtà dedicata a 360 gradi ai settori della casa e del giardino. Techradar - Le ultime notizie e recensioni dal mondo della tecnologia, su computer, sistemi per la casa, gadget e altro.
Aibay - Scopri AiBay, il leader delle notizie sull'intelligenza artificiale. Resta aggiornato sulle ultime innovazioni, ricerche e tendenze del mondo AI con approfondimenti, interviste esclusive e analisi dettagliate. Coinlabs - Notizie, analisi approfondite, guide e opinioni aggiornate sul mondo delle criptovalute, blockchain e finanza

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-01-22