Laravrl

laravel Event

Laravel Event Event::fire('foo.bar', array($bar)); // 注册一个事件监听器. // void lis...

laravel 函数

laravel常用函数大全Helper数组 // 如果给定的键不存在于该数组,array_add 函数将给定的键值对加到数组中 array_ad...

laravel Redirect

laravel Redirectreturn Redirect::to('foo/bar'); return Redirect::to('foo/bar')->with('...

laravel 自定义函数

laravel 自定义函数引入laravel自定义函数方法有2中1.自动加载是借助 composer 来实现的,我们需要创建自己的辅助函数文件,然后...

laravrl5 Collection

laravrl5 Collection基本操作// 创建集合 collect([1, 2, 3]); // 返回该集合所代表的底层数组: $colle...

Laravel Response

Laravel Response return Response::make($contents); return Response::make($contents, 200); return&n...

laravel Form

Form laravel操作表单Form::open(array('url' => 'foo/bar', 'method' =>&n...

laravel5 Cookie

laravel5 CookieCookie::get('key'); Cookie::get('key', 'default'); // 创建一个永久有...

laravel Input

laravel InputInput::get('key'); // 指定默认值 Input::get('key', 'default'); Input::...

laravel模型

laravel模型基础使用  // 定义一个 Eloquent 模型 class User extends Model {} //...

laravel UnitTest

Install and run // 将其加入到 composer.json 并更新: composer require "phpunit/...

laravel Log

laravel LogLog::info('info'); Log::info('info',array('context'=>'additional info...

Laravel Request

Laravel Request// url: http://xx.com/aa/bb  Request::url(); // 路径: /aa/bb  Request::p...

Laravel Route(路由)

Laravel Route(路由)Route::get('foo', function(){}); Route::get('foo', 'ControllerName@f...