承接 antonioprimera/laravel-site-components 相关项目开发

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

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

antonioprimera/laravel-site-components

Composer 安装命令:

composer require antonioprimera/laravel-site-components

包简介

Useful reusable components for laravel sites

README 文档

README

Latest Version on Packagist

This package provides a set of useful reusable components for laravel sites, based on the antonioprimera/larave-site package.

The laravel-site package introduces the Site, Page, Section and Bit models, which hold the contents of a site. The laravel-site package is view agnostic, and only provides abstract view component classes, used to build concrete view components.

This package provides some useful prebuilt components, that you can use in your site.

Installation

You can install the package via composer:

composer require antonioprimera/laravel-site-components

Scaffolding commands

Scaffold the layout

You can scaffold the layout components by running the following command:

php artisan site-components:layout

This will generate the following View Components: OuterLayout, GuestLayout, GuestNav and the css file for the guest nav.

Prebuilt components

The package provides a set of prebuilt components that you can use in your site. The prebuilt components are focused on handling the rendering of sections and bits (see the antonioprimera/larave-site package for more information on sections and bits).

SectionContainer

This is a simple container component, providing a responsive layout for sections, with a max width and some horizontal padding. It does not have any props. It comes with some default tailwind classes for styling, but you can override the styling by creating a 'section-container' class in your css.

<x-site-section-container>
    <!-- Your section content here -->
</x-site-section-container>

SectionTitle

This is a title component for a section, rendering a heading tag with the section title. The component has no styling. You can style it, by defining a 'section-title' class in your css.

Props:

  • title (string): the title of the section (optional) (at least one of title or section must be provided)
  • section (Section): the section model instance (optional) (the section has precedence over the string title)
  • level (int|string): the heading level (default: 2)
<x-site-section-title title="{{ $section->title }}"/>
<!-- or -->
<x-site-section-title :section="$section"/>
<!-- or with a specific heading level -->
<x-site-section-title :section="$section" level="3"/>

Image

This is an image component, rendering a responsive spatie media model. The component accepts a media model, a section model or a bit model as a prop. The component has no styling. You can style it, by defining a 'site-image' class in your css. If the media model is not provided, the component will render a placeholder svg image.

Props:

  • media (Media): the media model instance (optional) (at least one of media, section or bit must be provided)
  • section (Section): the section model instance (optional) (the image of the section will be rendered - if any)
  • bit (Bit): the bit model instance (optional) (the image of the bit will be rendered - if any)
<x-site-image :media="$media"/>
<!-- or -->
<x-site-image :section="$section"/>
<!-- or -->
<x-site-image :bit="$bit"/>

Nav

This is a basic navigation component, rendering a responsive site nav bar. The component accepts a NavItemCollection as a prop (a collection of NavItem instances). The component has some basic styling, but you can style it, by publishing the css file and overriding the default styles.

Props:

  • items (NavItemCollection|array): a collection of AntonioPrimera\SiteComponents\ViewModels\NavItem instances

Alternatively, you can inherit the Nav component class and override the navItems() method, to provide the navigation items for the nav bar.

<x-site-nav :items="$navItems"/>
<!-- or, if you inherited the Nav class, in a local View/Components/Nav class and defined the navItems inside -->
<x-nav/>

Contributing

Feel free to contribute to this package by creating a pull request. Just please keep in mind the following guidelines:

  • Follow the Laravel coding style
  • Write tests for your code (if applicable) and make sure they pass
  • Document your code and update the README.md file
  • Keep the package simple and focused on the main goal: providing reusable components for laravel websites

License

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

antonioprimera/laravel-site-components 适用场景与选型建议

antonioprimera/laravel-site-components 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 20 次下载、GitHub Stars 达 0, 最近一次更新时间为 2024 年 08 月 22 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「laravel」 「antonioprimera」 「laravel-site-components」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

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

围绕 antonioprimera/laravel-site-components 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

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