承接 tediscript/laravel-view-generator 相关项目开发

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

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

tediscript/laravel-view-generator

Composer 安装命令:

composer require tediscript/laravel-view-generator

包简介

Laravel module to generate view from artisan command

README 文档

README

Laravel module to generate view from artisan command

Installation via composer

Run command:

composer require --dev tediscript/laravel-view-generator

Or add this script to your composer.json and run composer update

    "require-dev": {
        "tediscript/laravel-view-generator": "^1.0.0"
    }

Usage

Just like you create model via php artisan.

Make View Command

php artisan make:view view-name

It will generate file resources/views/view-name.blade.php using plain.stub template.

php artisan make:view schools.edit --model=School --layout=edit

It will generate file resources/views/schools/edit.blade.php using edit.stub template.

  • argument schools.edit is the path name of blade file (just like view name in render)
  • option --model=School is the model name. It is optional. Default model name is Item
  • option --layout=edit is used to specify the view stub file. The option are create, edit, index, plain, show. The default value is plain

Create your own layout template

You can create your own stub file inside folder resources/stubs. For example create file resources/stubs/welcome.stub then you can call artisan command:

php artisan make:view awesome --layout=welcome

It will generate file resources/views/awesome.blade.php using welcome.stub layout.

The supported variable to render are:

  • {{ model }} we get it from option --model
  • {{ pluralModel }} we get it from pluralize of model
  • {{ resourceName }} we get it from lower case of pluralModel
  • {{ instanceModel }} we get it from camel case of model
  • {{ instanceCollectionModel }} we get it from pluralize of instanceModel

Thats it.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-06-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固