netflex/structures 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

netflex/structures

最新稳定版本:v6.7.3

Composer 安装命令:

composer require netflex/structures

包简介

Netflex Structure library

README 文档

README

Stable version Build status License: MIT Contributors Downloads

[READ ONLY] Subtree split of the Netflex Structures component (see netflex/framework)

Eloquent compatible model for working with Netflex structures.

Installation

composer require netflex/structure

Example usage

<?php

use Netflex\Structure\Model;

/**
 * @property string $permalink
 */
class Article extends Model
{
  /**
   * The directory_id associated with the model.
   *
   * @var int
   */
  protected $relationId = 10000;

  /**
   * The attributes that are mass assignable.
   *
   * @var array
   */
  protected $fillable = [
    'name', 'author', 'content'
  ];

  /**
   * Gets the full URL to the article
   *
   * @return string
   */
  public function getPermalinkAttribute()
  {
    return 'https://news.example.com/' . $this->created->format('Y-m-d') - '/' . $this->url;
  }
}

$articlesByJohn = Article::where('author', 'John Doe')
  ->paginate();

$slug = 'top-10-tricks-for-working-with-netflex';
$articleForUrl = Article::resolve($slug);

$firstArticle = Article::first();
$lastArticle = Article::last();

$newestArticle = Article::orderBy('updated', 'desc')->first();

$freshArticle = new Article([
  'name' => 'Fresh new article',
  'author' => 'John Doe',
  'content' => '<h1>Hello world!</h1>'
]);

$freshArticle->save();

Contributing

Thank you for considering contributing to the Netflex Structure! Please read the contribution guide.

Code of Conduct

In order to ensure that the community is welcoming to all, please review and abide by the Code of Conduct.

License

Netflex Structure is open-sourced software licensed under the MIT license.

Copyright © 2020 Apility AS

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-09-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固