资讯专栏INFORMATION COLUMN

轻量级 PHP 框架 TinyLara 发布

CarlBenjamin / 2159人阅读

TinyLara

</>复制代码

  1. ______ _ __
  2. /_ __/ (_) ____ __ __ / / ____ _ _____ ____ _
  3. / / / / / __ / / / / / / / __ `/ / ___/ / __ `/
  4. / / / / / / / / / /_/ / / /___/ /_/ / / / / /_/ /
  5. /_/ /_/ /_/ /_/ \__, / /_____/\__,_/ /_/ \__,_/
  6. /____/

TinyLara is a simple PHP framework based on Composer, looks like a Lite Edition of Laravel. http://tinylara.com/

Github

Github Repo: https://github.com/TinyLara/TinyLara

Start Download:

</>复制代码

  1. git clone https://github.com/TinyLara/TinyLara
  2. cd TinyLara
Install dependencies:

</>复制代码

  1. composer update

Then modify app/database.php with right information and import demo.sql.

See:

config/routes.php :

</>复制代码

  1. Macaw::get("", "HomeController@home");

app/controllers/HomeController.php :

</>复制代码

  1. public function home()
  2. {
  3. // build view sample
  4. $this->view = View::make("home")->with("article",Article::first())
  5. ->withTitle("MFFC :-D")
  6. ->withFooBar("foo_bar");
  7. /*
  8. // build mail sample
  9. $this->mail = Mail::to(["ooxx@gmail.com", "ooxx@qq.com"])
  10. ->from("OOXX ")
  11. ->title("Foo Bar")
  12. ->content("

    Hello~~

    ");
  13. // redis sample
  14. Redis::set("key","value",3000,"ms");
  15. echo Redis::get("key");
  16. */
  17. }
Run:

</>复制代码

  1. cd public && php -S 127.0.0.1:3000

Visit http://127.0.0.1:3000/

It"s already running!


Features

Suer small (~150 LOC) router: fast and sexy codingbean/macaw

MVC architecture

One of the Most powerful PHP ORM on Earth: Laravel Eloquent

Powerful Laravel-style views loader

Redis ready in Laravel-style

Handy SMTP mailer

License

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

文章版权归作者所有,未经允许请勿转载,若此文章存在违规行为,您可以联系管理员删除。

转载请注明本文地址:https://www.ucloud.cn/yun/20847.html

相关文章

  • 量级 PHP 框架 TinyLara 更新:更优雅 附中文介绍

    摘要:中文介绍是一个轻量级框架,基于,可以看成的精简版。官方网站项目地址开始使用下载或者安装依赖包修改数据库配置文件,将导入数据库。一行代码即可发送邮件。协议采用协议分发,衍生项目除了必须采用协议之外无任何限制。 TinyLara showImg(http://lvwenhan.com/content/uploadfile/201410/dcd81414652600.png); __...

    loonggg 评论0 收藏0
  • CrossPHP 1.5.3 发布量级 PHP 开发框架

    摘要:更新说明一新增功能增加匹配所有请求类型二优化去掉由功能更强大的取代更名为匹配时区分大小写提升不带参数匹配下的性能生成缩略图时增加品质参数减少中的静态成员变量改用匿名函数容器来传递参数优化解密带问号的参数导致解密失败的三默认风格变更为 1.5.3 更新说明 一. 新增功能 增加Rest::any(), 匹配所有请求类型 $app = CrossCoreDelegate::loadApp...

    paulquei 评论0 收藏0
  • 新一代量级PHP扩展框架 Asf

    摘要:一是什么全称用语言编写的轻量级扩展框架专注于开发。这里只是给出了一种测试方法通过多次不同并发数测试结果得知与原生性能消耗是。业务开发速度结论采用框架开发业务代码量能节约。 showImg(https://segmentfault.com/img/bVbamHp?w=320&h=320); 一、Asf 是什么? 全称 API Services Framework, 用C语言编写的轻量级P...

    iOS122 评论0 收藏0

发表评论

0条评论

CarlBenjamin

|高级讲师

TA的文章

阅读更多
最新活动
阅读需要支付1元查看
<