承接 marvinrabe/blade-flags 相关项目开发

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

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

marvinrabe/blade-flags

Composer 安装命令:

composer require marvinrabe/blade-flags

包简介

A package to easily make use of country flags in your Laravel Blade views.

README 文档

README

Latest Version on Packagist GitHub Tests Action Status Total Downloads

A package to easily make use of country flags in your Laravel Blade views.

For a full list of available flags see the SVG directory or preview them at flag-icons. Flag SVGs are provided by lipis/flag-icons.

Requirements

  • PHP 8.0 or higher
  • Laravel 9.0 or higher

Installation

composer require marvinrabe/blade-flags

Blade Icons

Blade Flags uses Blade Icons under the hood. Please refer to the Blade Icons readme for additional functionality. We also recommend to enable icon caching with this library.

Configuration

Blade Flags also offers the ability to use features from Blade Icons like default classes, default attributes, etc. If you'd like to configure these, publish the blade-flags.php config file:

php artisan vendor:publish --tag=blade-flags-config

Usage

Icons can be used as self-closing Blade components which will be compiled to SVG icons:

<x-flag-4x3-us/>

You can also pass classes to your icon components:

<x-flag-4x3-us class="w-6 h-6"/>

And even use inline styles:

<x-flag-4x3-us style="color: #555"/>

Or use the @svg directive:

@svg('flag-4x3-us', 'w-6 h-6', ['style' => 'color: #555'])

Flags are available in two aspect ratios. The 4x3 flags:

<x-flag-4x3-us/>
<x-flag-4x3-de/>
<x-flag-4x3-fr/>

And the 1x1 (square) flags:

<x-flag-1x1-us/>
<x-flag-1x1-de/>
<x-flag-1x1-fr/>

Raw SVG Icons

If you want to use the raw SVG icons as assets, you can publish them using:

php artisan vendor:publish --tag=blade-flags --force

Then use them in your views like:

<img src="{{ asset('vendor/blade-flags/4x3-us.svg') }}" width="10" height="10"/>

Credits

License

Blade Flags is open-sourced software licensed under the MIT license.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-02-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固