Skip to content

Instantly share code, notes, and snippets.

View syossan27's full-sized avatar
💭
🤔

syossan27 syossan27

💭
🤔
View GitHub Profile
@syossan27
syossan27 / file0.txt
Created June 3, 2014 09:00
Laravel Homesteadを使ってみよう! ref: http://qiita.com/syo/items/0104615e5f9ae26f0720
vagrant box add laravel/homestead
git clone https://github.com/laravel/homestead.git Homestead
@syossan27
syossan27 / file0.txt
Created June 3, 2014 09:06
Laravel4.2+HHVMでのバグっぽい挙動 ref: http://qiita.com/syo/items/0a84d0c4d90e6b4a1bd1
protected function compileEchos($value)
{
// 引数の$valueをerror_logなどで確認すればよく分かる
$difference = strlen($this->contentTags[0]) - strlen($this->escapedTags[0]);
if ($difference > 0)
{
return $this->compileEscapedEchos($this->compileRegularEchos($value));
@syossan27
syossan27 / file0.txt
Created June 3, 2014 09:08
Laravel4.1.xから4.2.xへのアップグレード方法 ref: http://qiita.com/syo/items/6b4ecda47cdbf477d2b0
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"require": {
"laravel/framework": "4.2.*",
},
@syossan27
syossan27 / file0.txt
Created June 3, 2014 09:19
Laravelでお手製ライブラリを使いたい時のTips ref: http://qiita.com/syossan27/items/c69acc3044424a210932
mkdir libraries
@syossan27
syossan27 / file0.txt
Created June 3, 2014 09:23
LaravelでDB処理を書くときに気を付けたいこと ref: http://qiita.com/syo/items/e269b4784c75cff821c4
try
{
// InsertとかupdateとかのDB処理
} catch(exception e)
{
// エラー内容の表示
}
{{Form::checkbox('test', 1, true)}}
{{Form::checkbox('test', 2, true)}}
@syossan27
syossan27 / file0.txt
Created June 3, 2014 09:26
Laravelのmigrate:reset時に謎エラーが出た時の対処 ref: http://qiita.com/syo/items/2b5b620320ae1ad8d6bc
[Illuminate\Database\QueryException]
SQLSTATE[42S02]: Base table or view not found: 1051 Unknown table 'hoge' (SQL: drop table `hoge`)
@syossan27
syossan27 / file0.txt
Created June 3, 2014 09:30
CentOS6.5にHHVMを入れる時のTips ref: http://qiita.com/syo/items/b16a21d3f31e637c7e26
$ yum install http://ftp.riken.jp/Linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
$ yum upgrade
$ cd /etc/yum.repos.d/
$ wget http://www.hop5.in/yum/el6/hop5.repo
$ yum install hhvm
@syossan27
syossan27 / file0.txt
Created June 4, 2014 16:19
実行するSQLのクエリーをlaravel.log以外に吐いてみた ref: http://qiita.com/syo/items/215ca672ebc04970444e
<?php namespace Illuminate\LogSql;
use Monolog\Logger;
use Illuminate\Support\ServiceProvider;
class LogSqlServiceProvider extends ServiceProvider {
/**
* Indicates if loading of the provider is deferred.
*
@syossan27
syossan27 / file0.txt
Created June 9, 2014 15:51
Application In Production!を表示させない方法 ref: http://qiita.com/syo/items/fc0e2bb987fa63a630f4
$env = $app->detectEnvironment(array(
'local' => array('*'),
// 'local' => array('your-machine-name'),
));