定制 lsshu/site-api 二次开发

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

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

lsshu/site-api

最新稳定版本:v0.0.0

Composer 安装命令:

composer require lsshu/site-api

包简介

dev

关键字:

README 文档

README

Laravel is a web application

Installation

This package requires PHP 7.4+ and Laravel 8.5

First, install laravel 8.5, and make sure that the database connection settings are correct.

composer require lsshu/site-api

Then run these commands to publish assets and config:

php artisan vendor:publish --provider="Lsshu\Site\Api\ServiceProvider" --tag="config"

After run command you can find config file in config/permisstion.php config/jwt.php config/site-api.php, in this file you can change the install directory,db connection or table names.

Add the following configuration to file config/filesystems.php

 'disks' => [
        ·
        ·
        ·
        'root' => [
            'driver' => 'local',
            'root' => base_path('/')
        ]
    ]

migrate.

php artisan migrate

At last run following command to finish install permission.

php artisan site-api:seed-permission

Open http://localhost/site-api/ in browser,Test whether the installation is successful 🏅.

Add the following configuration to file config/auth.php

'guards' => [
        ·
        ·
        ·
        'site-api' => [
            'driver' => 'jwt',
            'provider' => 'roots',
            'hash' => false,
        ],
    ],


'providers' => [
        ·
        ·
        ·
        'roots' => [
            'driver' => 'eloquent',
            'model' => Lsshu\Site\Api\Models\SystemUser::class,
        ],
    ],

Generate JWT encryption key

php artisan jwt:secret

Configurations

The file config/site-api.php contains an array of configurations, you can find the default configurations in there.

在 app/Http/Kernel.php 中找到 protected $routeMiddleware = [···]

protected $routeMiddleware = [
        .
        .
        .
        // 检查权限
        'check.permissions' => \Lsshu\Site\Api\Middleware\CheckPermissions::class
    ];

License

The Laravel framework is open-sourced software licensed under the MIT license.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-10-16