PHP之道 http://laravel-china.github.io/php-the-right-way/ PHP: The Right Way http://www.phptherightway.com/ Linx C/C++编程一站式学习 http://songjinshan.com/aka ...
分类:
其他好文 时间:
2016-05-03 12:26:43
阅读次数:
277
前言 接触laravel之后,才知道有PSR,composer之类的东西,PHP已经不再是一门草根语言了。最近在尝试玩thrift,需要安装PHP thrift依赖库,使用composer install apache/thrift会提示composer.json文件不存在,这个文件确实不存在,难道 ...
分类:
Web程序 时间:
2016-05-02 11:37:46
阅读次数:
149
Atiti. Php Laravel 5.1 环境搭建以及 error 排除 1. php_5.6.11_apache2.41 1.1. Httpd。Conf增加以下配置,添加php支持1 1.2. 修改apache位置与项目位置以及权限1 1.3. 修改php。Ini。增加mbstring,ope ...
分类:
Web程序 时间:
2016-05-02 00:37:49
阅读次数:
372
参考: http://www.elcoderino.com/check-laravel-version/ 1. The easiest way is to simply run artisan command php artisan --version from your CLI and it wi ...
分类:
其他好文 时间:
2016-05-01 13:27:07
阅读次数:
127
/**
*Replacetheclassnameforthegivenstub.
*
*@paramstring$stub
*@paramstring$name
*@returnstring
*/
protectedfunctionreplaceClass($stub,$name)//replaceClass
{
$class=str_replace($this->getNamespace($name).‘\\‘,‘‘,$name);//checktheclass
returnstr_replace(..
分类:
其他好文 时间:
2016-04-29 20:20:10
阅读次数:
125
/**
*Getthedestinationclasspath.
*
*@paramstring$name
*@returnstring
*/
protectedfunctiongetPath($name)
{
$name=str_replace($this->laravel->getNamespace(),‘‘,$name);//changenametotherightname
return$this->laravel[‘path‘].‘/‘.str_replace(‘\\‘,‘/‘,$..
分类:
其他好文 时间:
2016-04-28 12:37:01
阅读次数:
210
首先要阅读这篇文章,你一定已经掌握了composer 和 artisan 。 第一步,打开https://packagist.org/这个网址,在搜索框内输入way/generators 如图 第二步直接上图: 在你的composer.json里面加上第一个红框的代码。然后在命令行里面执行第二个红框 ...
分类:
其他好文 时间:
2016-04-27 20:46:02
阅读次数:
957
在用laravel框架来获取数据,若数据不存在时,以为会返回空,其实不是的,会返回如下: 当 $result 为空时,empty($result) 是不为false的,还是有值的,如上,因此要用 count($result) 来验证;或者修改获取语句,改为 则会把 $result 转化为数组,这样 ...
分类:
其他好文 时间:
2016-04-27 18:52:12
阅读次数:
259
使用 composer 安装 laravel 时报错, 如下: [ReflectionException] Class Fxp\Composer\AssetPlugin\Repository\NpmRepository does not exist [ErrorException] Declarat ...
分类:
其他好文 时间:
2016-04-27 18:40:10
阅读次数:
240
在项目的composer.json "barryvdh/laravel-ide-helper":"dev-master" 项目config/app.php 'Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider', composer.json,添加一行 ...
分类:
Web程序 时间:
2016-04-27 12:36:28
阅读次数:
173