GithubHelp home page GithubHelp logo

we820731 / saas-skeleton Goto Github PK

View Code? Open in Web Editor NEW

This project forked from abbotton/saas-skeleton

0.0 1.0 0.0 238 KB

基于Laravel & Dcat Admin构建的SAAS后台脚手架.

Shell 0.09% PHP 98.40% Blade 1.51%

saas-skeleton's Introduction

banner

关于

本项目是基于LaravelDcat Admin 以及 archtechx/tenancy 构建的SAAS后台脚手架,支持多数据库多域名,开箱即用,欢迎提交PR共同完善本项目,如果本项目对您有帮助,还请给个Star支持一下,谢谢。

功能特性

  • 完全兼容Dcat Admin
  • 支持多数据库,每个租户拥有独立的数据库
  • 支持多域名,每个租户可以配置多个域名
  • 内置简单的租户管理功能
  • 内置系统配置模板,直接修改对应表单即可添加系统配置项
  • 自动检测租户是否已过期
  • 一键登陆至租户后台
  • 整合dcat-iframe-tab
  • 集成在线支付功能,供租户自动续费

安装

# 克隆本项目
git clone https://github.com/Abbotton/saas-skeleton

# 进入目录并安装相关依赖
cd saas-skeleton && composer install

# 复制.env.example为.env
cp .env.example .env

# 生成应用key
php artisan key:generate

# 修改.env中数据库以及APP_URL相关配置
vi .env

# 发布dcat-admin相关资源
php artisan admin:publish

# 发布dcat-iframe-tab相关资源
php artisan vendor:publish --tag=iframe-tab && php artisan vendor:publish --tag=iframe-tab.config

# 执行以下命令完成安装
php artisan admin:install && php artisan saas:init

# done !

管理

进行租户管理之前请确认域名解析完毕,建议进行泛域名解析。 现在假设已完成*.example.com的解析。

  • 访问 http://example.com/central 打开主控端登录页面,账号密码都是:admin
  • 点击左侧 租户管理 菜单添加一个租户,(假设域名是:test.example.com);
  • 访问http://test.example.com 可以看到租户ID;
  • 访问http://test.example.com/admin 可以打开租户对应后台,账号密码都是:admin
  • 为方便管理,在租户管理页面,点击任意租户右侧工具栏中的登录后台菜单,可以无视租户管理员账号密码,直接登陆至租户的后台;

FAQ

1、如何扩展租户表字段?

新建一个迁移文件,添加新的字段,然后修改app/Models/Tenant.php,将新字段填写至getCustomColumns()方法中,再根据自己的业务逻辑修改app/Central目录中的文件即可。

2、如何添加主控端的系统配置

修改app/Central/Forms/AdminSetting.php文件即可。

3、如何添加租户的系统配置

修改app/Admin/Forms/AdminSetting.php文件即可。

License

The MIT License (MIT).

saas-skeleton's People

Contributors

abbotton avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.