承接 atk14/slug-field 相关项目开发

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

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

atk14/slug-field

Composer 安装命令:

composer require atk14/slug-field

包简介

ATK14 form field for entering slugs

README 文档

README

ATK14 form field for entering slugs.

Usage

In a form:

<?php
// file: app/forms/articles/create_new_form.php
class CreateNewForm extends ApplicationForm {

  function set_up(){

    $this->add_field("title", new CharField([
      "label" => "Article title",
      "max_length" => 100, // by default it is either constant SLUG_MAX_LENGTH (if defined) or 65
    ]));

    // ... other article fields

    $this->add_field("slug", new SlugField([
      "label" => "Slug for cool looking url",
      "hint" => "are-you-too-clever-for-success",
      "auto_slugify" => true, // whether to convert automatically something like "Nice Title!" to "nice-title"; default is true
      "max_length" => 100,
    ]));
  }
}

Configuration

Optionally the default value for the max_length option can be set by the constant SLUG_MAX_LENGTH.

<?php
// file: config/settings.php

// ...

define("SLUG_MAX_LENGTH",100);

Installation

Just use the Composer:

cd path/to/your/atk14/project/
composer require atk14/slug-field dev-master

ln -s ../../vendor/atk14/slug-field/src/slug_field.php app/fields/slug_field.php

License

SlugField is free software distributed under the terms of the MIT license

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-04-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固