承接 johncarter/filament-focal-point-picker 相关项目开发

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

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

johncarter/filament-focal-point-picker

最新稳定版本:v4.1.0

Composer 安装命令:

composer require johncarter/filament-focal-point-picker

包简介

An image focal point picker for Filament Admin.

README 文档

README

A custom field for Filament Admin. The field allows you to save a position on an image to act as its focal point, or focus. This can be used with the CSS object-position property to crop images on different aspect ratios.

The field returns a string with 2 percentages: distance from left, distance from top. e.g. "17% 54%".

See this video for a demo: https://vimeo.com/690530672

Installation

You can install the package via composer:

composer require johncarter/filament-focal-point-picker

Optionally, you can publish the views using

php artisan vendor:publish --tag="filament-focal-point-picker-views"

Usage

FileUpload::make('my_image_field')->maxFiles(1), FocalPointPicker::make('focal_point') ->default('10% 25%') // default: "50% 50%" ->imageField('my_image_field') // Or, return an image url from a closure on the image() method // ->image(function() { // return 'https://www.example.com/images/image1.jpg' // })

Then in your blade template:

<div class="aspect-w-16 aspect-h-5"> <img src="{{ $myPageData['image'] }}" class="object-cover w-full h-full" style="object-position: {{ $myPageData['focal_point'] }}" /> </div>

Changelog

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

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

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

统计信息

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

GitHub 信息

  • Stars: 43
  • Watchers: 2
  • Forks: 9
  • 开发语言: Blade

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固