PHPackages                             litp/laravel-on-sae - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. litp/laravel-on-sae

ActiveProject[Framework](/categories/framework)

litp/laravel-on-sae
===================

The Laravel Framework For SAE

v5.2.15(10y ago)233MITPHPPHP &gt;=5.5.9

Since Feb 8Pushed 10y ago1 watchersCompare

[ Source](https://github.com/litp/laravel-on-sae)[ Packagist](https://packagist.org/packages/litp/laravel-on-sae)[ RSS](/packages/litp-laravel-on-sae/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (6)Versions (29)Used By (0)

Laravel on SAE
==============

[](#laravel-on-sae)

Laravel on SAE 是修改过彻底解决了`putenv`和本地写问题的Laravel，因而它可以在SAE上完美地运行。

一次性彻底解决问题并且适应各个版本的Laravel。

解决`putenv`被禁用
-------------

[](#解决putenv被禁用)

SAE禁用了`putenv`函数（其他很多开发平台也同样会禁用`putenv`），Laravel中使用的phpdotenv模块不能正常使用。

Laravel on SAE 使用[sae-phpdotenv](https://github.com/litp/sae-phpdotenv)替代phpdotenv，然后修改env()函数使其从全局变量`$_ENV`中获取变量，从而使phpdotenv可以在禁用`putenv`的平台中正常使用。

本地写被禁止
------

[](#本地写被禁止)

SAE只允许通过git或者svn上传代码，并且代码在运行过程中对文件系统只有读取权限没有写入权限。

在Laravel 5中需要进行本地写操作的地方有：

> 1. 模板编译
> 2. 缓存类
> 3. 日志处理
> 4. Session类
> 5. 服务提供者缓存
>
> 参考 [夏天的风博客](http://www.xtwind.com/laravel-5-1-on-sae.html)

解决的办法是使用SAE提供的Storage的文件Wrapper，把需要本地写的内容存到SAE Storage中。

具体操作为：

1. 在SAE Storage 中新建一个bucket, 名字为 `laravel`
2. 完成。

详细原理和细节请参考 这里。

因为在Laravel中这些相关的写操作的目录都被硬编码在Laravel Framwork中，所以不能通过修改配置而只能通过修改laravel framework的源码来实现。 [Sae-laravel-framework](https://github.com/litp/sae-laravel-framework)就是我fork自laravel官方framework并在相应地方做了修改的版本，使用时只需用它替换`composer.json`中的`laravel/laravel`即可。

感谢
--

[](#感谢)

欢迎提供各种意见及建议。

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 86.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~42 days

Recently: every ~56 days

Total

27

Last Release

3743d ago

Major Versions

v4.2.11 → v5.0.02015-02-04

### Community

Maintainers

![](https://www.gravatar.com/avatar/12c2c17f698f6fd946698ec0a0b6fc3e3a9e38c696115f776e410afe2cd75df3?d=identicon)[litp](/maintainers/litp)

---

Top Contributors

[![taylorotwell](https://avatars.githubusercontent.com/u/463230?v=4)](https://github.com/taylorotwell "taylorotwell (3598 commits)")[![daylerees](https://avatars.githubusercontent.com/u/207870?v=4)](https://github.com/daylerees "daylerees (105 commits)")[![franzliedke](https://avatars.githubusercontent.com/u/249125?v=4)](https://github.com/franzliedke "franzliedke (92 commits)")[![jasonlewis](https://avatars.githubusercontent.com/u/829059?v=4)](https://github.com/jasonlewis "jasonlewis (48 commits)")[![sparksp](https://avatars.githubusercontent.com/u/243893?v=4)](https://github.com/sparksp "sparksp (37 commits)")[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (33 commits)")[![cviebrock](https://avatars.githubusercontent.com/u/166810?v=4)](https://github.com/cviebrock "cviebrock (33 commits)")[![tobsn](https://avatars.githubusercontent.com/u/109529?v=4)](https://github.com/tobsn "tobsn (26 commits)")[![crynobone](https://avatars.githubusercontent.com/u/172966?v=4)](https://github.com/crynobone "crynobone (22 commits)")[![bencorlett](https://avatars.githubusercontent.com/u/181919?v=4)](https://github.com/bencorlett "bencorlett (13 commits)")[![JeffreyWay](https://avatars.githubusercontent.com/u/183223?v=4)](https://github.com/JeffreyWay "JeffreyWay (12 commits)")[![neoascetic](https://avatars.githubusercontent.com/u/725836?v=4)](https://github.com/neoascetic "neoascetic (11 commits)")[![ericlbarnes](https://avatars.githubusercontent.com/u/116662?v=4)](https://github.com/ericlbarnes "ericlbarnes (11 commits)")[![litp](https://avatars.githubusercontent.com/u/10564187?v=4)](https://github.com/litp "litp (10 commits)")[![jesseobrien](https://avatars.githubusercontent.com/u/865481?v=4)](https://github.com/jesseobrien "jesseobrien (10 commits)")[![Jakobud](https://avatars.githubusercontent.com/u/87356?v=4)](https://github.com/Jakobud "Jakobud (9 commits)")[![mikelbring](https://avatars.githubusercontent.com/u/455383?v=4)](https://github.com/mikelbring "mikelbring (9 commits)")[![kapv89](https://avatars.githubusercontent.com/u/1023032?v=4)](https://github.com/kapv89 "kapv89 (9 commits)")[![codler](https://avatars.githubusercontent.com/u/102052?v=4)](https://github.com/codler "codler (9 commits)")[![kbanman](https://avatars.githubusercontent.com/u/635006?v=4)](https://github.com/kbanman "kbanman (8 commits)")

---

Tags

frameworklaravel

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/litp-laravel-on-sae/health.svg)

```
[![Health](https://phpackages.com/badges/litp-laravel-on-sae/health.svg)](https://phpackages.com/packages/litp-laravel-on-sae)
```

###  Alternatives

[codewithdennis/larament

Larament is a time-saving starter kit to quickly launch Laravel 13.x projects. It includes FilamentPHP 5.x pre-installed and configured, along with additional tools and features to streamline your development workflow.

3691.5k](/packages/codewithdennis-larament)[kompo/kompo

Laravel &amp; Vue.js FullStack Components for Rapid Application Development

11812.4k21](/packages/kompo-kompo)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
