rentalmanager/amenities 问题修复 & 功能扩展

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

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

rentalmanager/amenities

Composer 安装命令:

composer require rentalmanager/amenities

包简介

Rental Manager Amenities package which propels the basic system where you can manage properties for rent.

README 文档

README

A package made for Rentbits for easier maintenance and modularity of managing rental listings. It includes all migrations, models and relations to run the rental system.

Installation, Configuration and Usage

Installation

Via Composer

composer require rentalmanager/amenities

Configuration

Once you install the package, it should be automatically discovered by the Laravel. To check this, in your terminal simply run the:

$ php artisan

There you should find the all rm:* commands.

First step after checking is to publish the vendors:

$ php artisan vendor:publish --tag="amenities"

After that it depends on you. If you are a hard learner, run through each commands manually, but then you can just simply run the

$ php artisan rm:setup-amenities

Thats it...

$ composer dump-autoload

You can add seeder class to your DB seeder like:

$this->call(RentalManagerAmenitiesSeeder::class);

Or by running the seeder directly by invoking:

$ php artisan db:seed --class=RentalManagerAmenitiesSeeder 

Usage

Below is the sample usages of this package:

To attach the single amenity to a unit or a property (the same applies)

$object->attachAmenity(1);

To attach multiple amenities

$object->attachAmenities([1,2,3]);

There is common sync methods as well

$object->syncAmenities([1,2,3]);

and without detaching

$object->syncAmenitiesWithoutDetaching([1,2,3]);

Scopes

This package provides a usable scope for amenitable objects

// get all objects where amenities are
$result = $object->whereAmenitiesAre([1,2,3]);

And few scopes for the amenity model itself

$amenities = Amenity::byGroup('notable');

$amenities = Amenity::byType('unit');

// disctinct by groups
$groups = Amenity::groups();

$types = Amenity::types();

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: proprietary
  • 更新时间: 2018-08-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固