方法:到laravel跟目录下执行如下操作:
1)php artisan cache:clear
2)chmod -R 777 app/storage
3)php artisan dump-autoload...
分类:
移动开发 时间:
2015-08-05 12:51:59
阅读次数:
231
Composer安装过程一.安装Composer 首先你需要安装Composer,Composer是PHP依赖管理工具,Laravel框架就是使用Composer执行安装和依赖管理。 注: (1)若安装Composer出错,在php.ini中开启php_openssl,php_fileinfo扩展,...
分类:
其他好文 时间:
2015-08-05 12:32:34
阅读次数:
122
教程里安装成功lavavel之后在地址栏输入http://localhost/laravel5/public/home如果访问失败进不去登陆页面,那可能是因为没有开启apache里的mod rewrite 模块开启方法:把httpd.conf文件中#LoadModule rewrite_module...
分类:
其他好文 时间:
2015-08-05 12:13:51
阅读次数:
144
1.路由配置'blog.index','uses'=>'BlogController@index']);Route::get('/create',['as'=>'blog.create','uses'=>'BlogController@create']);Route::post('blog/stor...
分类:
其他好文 时间:
2015-08-04 10:57:59
阅读次数:
116
1.在composer.json加入下面一行代码"guzzlehttp/guzzle":"~4.0"2.发送邮件的RouteRoute::get('/mail',['as'=>'emails.index','uses'=>'EmailController@index']);3.项目/app/mail...
分类:
其他好文 时间:
2015-08-04 10:57:27
阅读次数:
95
1.配置模糊查询的路由Route::get('widget',function(){$filter=[['id','>','0'],['title','like','%aa%']];$data=Widget::datalist("article","widget.list",$filter,4);/...
分类:
其他好文 时间:
2015-08-04 10:55:23
阅读次数:
125
publicfunctionbuyerAlreadybrand(){$effect=Request::get('effect');$data=$this->brand->where(function($query)use($effect){if($effect==-1){return$query->...
分类:
数据库 时间:
2015-08-04 10:36:23
阅读次数:
365
User: model ; users: 表名; user_id键值 relation: public function tasks(){return $this->belongsToMany('Task','task_id');} Task: model名; tasks:表名; task_...
分类:
其他好文 时间:
2015-08-02 23:11:19
阅读次数:
134
laravel一大特色就是event事件系统。一般首先要listen一个事件,随后fire那个事件,这时执行路径将会调用event handler,返回后继续执行。例如:Event::listen('user.login',function(\Kidsit\User $user){ var...
分类:
其他好文 时间:
2015-08-02 23:08:26
阅读次数:
596
laravel中一般对于路由的使用方法是在routes.php中定义一个路由,在view中如果要引用一个url则直接通过来使用。但是随着应用的不断膨胀,想记住这些url也不是一个简单的事情。一种比较好的引用url的方式是 named route。 命名路由首先需要在routes.php中定义路...
分类:
其他好文 时间:
2015-08-02 23:05:29
阅读次数:
138