承接 simplecms/company 相关项目开发

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

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

simplecms/company

最新稳定版本:1.0.4

Composer 安装命令:

composer require simplecms/company

包简介

公司信息附带单独账号,适用企业类型

README 文档

README

📦 The collection breaks down the account module of the organization company, and can achieve various basic information components of multiple enterprises/agents through attachment extensions.

English | 简体中文

Latest Stable Version Latest Unstable Version Code Coverage Total Downloads License

Requirements

Installation

composer require simplecms/company

Usage

Model Usage

The model inherits CompanyAbstract to add downward associations to Company. The naming of downward associations is named in the plural form of camel based on the file name of the Model. use CompanyTrait to add upward BelongsTo associations to the model.

use \SimpleCMS\Company\Abstracts\CompanyAbstract;
use \SimpleCMS\Company\Traits\CompanyTrait;
class Product extends CompanyAbstract
{
    use CompanyTrait;

    //If companyRelations is not set, the default plural form of Product's camel is used, corresponding key is company_id
    public static function companyRelations(){
        return [
            'products' => 'company_id', //Bind a hasMany relationship 'products' to Company, corresponding key is company_id
            'inventories' => 'supplier_id' // Bind a hasMany relationship 'inventories' to Company, corresponding key is supplier_id 
        ];
    }
}

Facades

Account login is completed through the CompanyAuthenticatable facade, and logging will be automatically written after login.

use SimpleCMS\Company\Facades\CompanyAuthenticatable;
CompanyAuthenticatable::apiLogin(string $account, string $password, array $messages = []): array //API interface login
CompanyAuthenticatable::guardLogin(string $guard, string $account, string $password, array $messages = []): bool|RedirectResponse; //Traditional AuthGuard login
CompanyAuthenticatable::getAccount(CompanyAccount $account): array //Get basic account information

Logging Events

Logging operations can be automatically handled by adding the SimpleCMS\Company\Http\Middleware\CompanyLogMiddleware middleware.

Models

use SimpleCMS\Company\Models\Company; //Company information
use SimpleCMS\Company\Models\CompanyAccount; //Login account
use SimpleCMS\Company\Models\CompanyApply; //Apply for entry
use SimpleCMS\Company\Models\CompanyLog; //Request log
use SimpleCMS\Company\Models\CompanyProfile; //Company profile
use SimpleCMS\Company\Models\CompanySafe; //Account security information

License

MIT

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-07-29