定制 johankladder/stadia 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

johankladder/stadia

Composer 安装命令:

composer require johankladder/stadia

包简介

A package for managing plants and levels for Planty.io

README 文档

README

Package description

This package contains all the sources for the stadia project. The main focus of this project is to offer support for using plants and stadia in combination with multiple country support.

Installation

Run the following command: composer require johankladder/stadia and following the instructions.

And publish the assets: php artisan vendor:publish --tag=public --force

Migration of the database

After installation run php artisan migrate

Seed countries and climate codes

After migrating the database, please run the following commands to publish the seeders: php artisan vendor:publish --tag=stadia-seeds and perform a composer dump-autoload to reload the newly added resources.

Also publish the needed datasets after the migration for stadia with the following command:

  • php artisan vendor:publish --tag=stadia-datasets

Run the seeders by the following commands:

  • php artisan db:seed --class=JohanKladder\\Stadia\\Database\\Seeds\\CountriesTableSeeder
  • php artisan db:seed --class=JohanKladder\\Stadia\\Database\\Seeds\\ClimateCodesTableSeeder
  • php artisan db:seed --class=JohanKladder\\Stadia\\Database\\Seeds\\KoepenLocationTableSeeder

Sync existing plants and levels

In your application you can now access the backend of the stadia environment. Go to /stadia to see it. Before you can actual use it, synchronise the existing plants into stadia. Please use the 'sync' button provided in the overview to initialise the models.

After that you can fill in date ranges and climate relative information about these plants.

Usage in general

Configuration

The Stadia environment will be available at the /stadia prefix and using only the web middleware. To customize this you can publish the config file with the following command: php artisan vendor:publish --provider="JohanKladder\Stadia\StadiaPackageServiceProvider" --tag="config". After that the stadia.php config file is located in your /config folder and can be changed accordingly. An example of this file is:

<?php

return [
    'prefix' => 'stadia',
    'middleware' => ['web'],
    'api-prefix' => 'stadia/api',
    'api-middleware' => ['api'],
    'plant_table_soft_deleted' => false,
    'plants_table_name' => 'plants',
    'plants_name_column' => 'name',
    'levels_table_name' => 'levels',
    'levels_name_column' => 'name',
];

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-04-21