承接 cloudstudio/card-extended 相关项目开发

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

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

cloudstudio/card-extended

Composer 安装命令:

composer require cloudstudio/card-extended

包简介

A Laravel Nova card.

README 文档

README

Total Downloads

Installation

You can install the package in to a Laravel app that uses Nova via composer:

composer require cloudstudio/card-extended

Next up, you must register the field with Nova. This is typically done in the resource file.

use Cloudstudio\CardExtended\CardExtended;

/**
     * Get the cards available for the request.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return array
*/
public function cards(Request $request)
{
    return [
        (new CardExtended())
            ->view('cards.text')
            ->data(User::find(1))
            ->onlyOnDetail()
            ->width('full'),
    ];
}

First parameter is a typical blade view

resurces/views/cards/text.blade.php

Example view

<div class="max-w-sm rounded overflow-hidden shadow-lg bg-white">
    <img class="w-full" src="https://tailwindcss.com/img/card-top.jpg" alt="Sunset in the mountains">
    <div class="px-6 py-4">
        <div class="font-bold text-xl mb-2">{{ $data->name }}</div>
        <p class="text-grey-darker text-base">
            Lorem ipsum dolor sit amet, consectetur adipisicing elit. Voluptatibus quia, nulla! Maiores et perferendis eaque, exercitationem praesentium nihil.
        </p>
    </div>
    <div class="px-6 py-4">
        <span class="inline-block bg-grey-lighter rounded-full px-3 py-1 text-sm font-semibold text-grey-darker mr-2">#photography</span>
        <span class="inline-block bg-grey-lighter rounded-full px-3 py-1 text-sm font-semibold text-grey-darker mr-2">#travel</span>
        <span class="inline-block bg-grey-lighter rounded-full px-3 py-1 text-sm font-semibold text-grey-darker">#winter</span>
    </div>
</div>
Nova Card Preview

Captura de pantalla 2019-04-30 a las 18 19 08

( Preview with this blade )

Second parameter is the data, you can use strings, number, array, collection...

$data = User::all();
$data = Auth::user()->name;
$data = ['title' => 'Hello world']
$data = 'hello!';
$data = 1;

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Credits

License

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 未知

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固