定制 cornell-custom-dev/laravel-starter-kit 二次开发

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

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

cornell-custom-dev/laravel-starter-kit

Composer 安装命令:

composer require cornell-custom-dev/laravel-starter-kit

包简介

Cornell University Custom Development Laravel Starter Kit

README 文档

README

A Cornell University CIT Custom Development starter kit and library for Laravel.

Goals

  • Reduce time to build Laravel apps
  • Increase consistency in configuration, third-party packages, and architecture
  • Increase code visibility, code quality, and team collaboration
  • Continuously improve code and practices
  • Lower barriers for support and reduce support time

Usage

The Starter Kit can be used as a starter kit for a new site or as a library for an existing site.

As a Starter Kit for a New Site

Used as a starter kit, this package deploys the cwd_framework_lite infrastructure and standard configuration files. The steps below get from a fresh Laravel install to a working site.

  1. Follow standard Laravel project creation, namely

    composer create-project --no-dev laravel/laravel your-app-name

    This is done with the --no-dev option, because we will be committing the vendor dir and don't need that extra baggage.

    NOTE: If you have GitHub CLI installed, you can immediately add this to GitHub as a repo with the following commands (be sure to replace the "your-app-name" references with your project info):

    cd your-app-name
    git init
    git add . && git commit -m "Initial commit"
    git branch -m main
    gh repo create --private CU-CommunityApps/CD-your-app-name
    git push --set-upstream origin main
  2. Composer require the LaravelStarterKit

    composer require --update-no-dev cornell-custom-dev/laravel-starter-kit

    Similar to the create-project option, the --update-no-dev keeps us from adding baggage to the vendor dir.

  3. Install the Starter Kit

    php artisan starterkit:install

    The starterkit:install command prompts for a set of install options:

    NOTE: The "project files" option updates .gitignore so that the vendor directory is no longer excluded. The next commit will be large because it includes everything in the vendor directory.

     git add . && git commit -m "Starter Kit install"
     git push
  4. Testing the site
    You can confirm the site is working with Lando, since the Starter Kit install process adds a .lando.yml file.

    lando start

    Then visit https://your-app-name.lndo.site and you should see the default Laravel page. To see the Laravel Starter Kit example page, edit /resources/views/welcome.blade.php to be:

    @include('cd-index')

As a Library for an Existing Site

For an existing Laravel site, this package can be composer-required to provide the library of classes and optionally install some components.

  1. Composer require the LaravelStarterKit

    composer require cornell-custom-dev/laravel-starter-kit
  2. Install the Starter Kit

    php artisan starterkit:install

    Note: When using as a library or updating an installation, you will not want to install the project files. You may still want to install the theme assets, view components, and possibly example files. Be aware that these will overwrite existing files.

Libraries

The libraries included in the Starter Kit are documented in their respective README files:

  • Contact/PhoneNumber: A library for parsing and formatting a phone number.
  • CUAuth: A middleware for authorizing Laravel users, mostly for Apache mod_shib authentication.

Deploying a site

Once a Media3 site has been created, you have confirmed you can reach the default site via a web browser, and you have access to the site login by command line, the code can be deployed.

You will likely need to map the php command to the correct version by editing ~/.bashrc to include this alias (for this to take effect, run source ~/.bashrc or just log in again):

# User specific aliases and functions
alias php="/usr/local/bin/ea-php81"

Since www/your-site/public will already exist, you need to do a little moving things around to git clone your site repo from GitHub:

cd www/your-site
mv public public.default
git clone --bare https://github.com/CU-CommunityApps/CD-your-app-name.git .git
git init && git checkout main

At this point you can configure the www/your-site/.env file:

cp .env.example .env
php artisan key:generate
nano .env

Be sure to set your APP_* values to appropriate values, based on whether it is production:

APP_NAME="Your Site"
APP_ENV=production
APP_DEBUG=false
APP_URL=https://your-site.edu
APP_NAME="Your Site - TEST"
APP_ENV=testing
APP_DEBUG=true
APP_URL=https://test.your-site.edu

If you visit your site now, you should see the Laravel site working.

Contributing

Anyone on the Custom Development team should be welcome and able to contribute. See CONTRIBUTING for details on how be involved and provide quality contributions.

cornell-custom-dev/laravel-starter-kit 适用场景与选型建议

cornell-custom-dev/laravel-starter-kit 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 200 次下载、GitHub Stars 达 1, 最近一次更新时间为 2022 年 12 月 16 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 cornell-custom-dev/laravel-starter-kit 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 cornell-custom-dev/laravel-starter-kit 我们能提供哪些服务?
定制开发 / 二次开发

基于 cornell-custom-dev/laravel-starter-kit 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-12-16