é人ããã°ã©ãã¼ç¬¬2ç
ãããã°ã©ãã¼å¿ èªæ¸ã¨è¨ã£ã¦ãééããªããããã®åèãé人ããã°ã©ãã¼ãã®ç¬¬2çãçºå£²ããã¾ããã
ãåçãçºå£²ããã2000å¹´11æ30æ¥ãã20å¹´ã
ãã½ããã¦ã§ã¢éçºã«é¢ããæè¡ã¯çºå±ãã¾ããããã½ããã¦ã§ã¢éçºã«ãããæ´»åã®ååã¯å¤ãã£ã¦ã¾ãããã
ããã£ããè²·ã£ãã®ã«1å¹´è¿ãæ¾ç½®ãã¦ã¾ããããã¼ã¡ã¼ã¡èªã¿å§ãããã¨æãã¾ãã
é人ããã°ã©ãã¼ç¬¬2çãå±ããã pic.twitter.com/glod7jIaHM
— ããã ãã¨ã@è»å¥½ãé 好ãæç好ãã²ã¨ã親ã¨ã³ã¸ã㢠(@satoshis) 2020å¹´12æ2æ¥
ãªãã¤ã¼ãæ°ã©ã³ãã³ã°ãµã¤ã Buztter.com
Laravelã®ç·´ç¿ãã¦ãã«ãªãã¤ã¼ãæ°ã»ãããæ°ã©ã³ãã³ã°ãµã¤ããä½ãã¾ããã
TwTimzã¨åããããªã®ã
â« Buztter.com
Twitter APIãå¶éãããã®ã§ãåããªããªãã¾ããã
ã¢ãã«ã®ä¿å㧠Column not found ã¨ã©ã¼ãã§ãã¨ãã®å¯¾å¦æ¹æ³
ã¢ãã«ãä¿åãããã¨ãã¦ã¨ã©ã¼ãçºçã
Illuminate\Database\QueryException : SQLSTATE[42S22]: Column not found: 1054 Unknown column 'hoge' in 'field list'
ãã¼ãã«ã«ã¯åå¨ããªãã¡ã³ãå¤æ°ãè¨å®ãã¦ããã¨ããã®ã¨ã©ã¼ãçºçããã
ã¢ãã«ã«ã¡ã³ãå¤æ°ãæãããããã©ãã¼ãã«ã«ä¿åããå¿ è¦ããªãå ´åã¯ãã¢ãã«ã®ã¡ã³ãå¤æ°å®£è¨ã§falseãè¨å®ãã¦ããã¨ãsave()ãå¼ãã ã¨ãã«ããã®ã¡ã³ãå¤æ°ãç¡è¦ãã¦ãããã
ä¾ãã°ãã¡ã³ãå¤æ° $hoge ãä¿åããªãå ´åã¯ã以ä¸ã®ããã«æ¸ãã
class Hoge extends Model { portected $fillable = { 'id', 'name', : }; public $hoge = false; }
è¨å®ã.envã«æ¸ããã®ã«åå¾ã§ããªãã¨ãã®å¯¾å¦æ¹æ³
Laravelã§è¨å®ãã¡ã¤ã«ã®å
容ãèªã¿è¾¼ã¿ããã®ã§ã.envãã¡ã¤ã«ã«è¨å®ãè¨è¿°ããã
ãã®å
容ããconfig/hoge.php ã§èªã¿è¾¼ãã
return array(
'hoge' => env('HOGE', 'default-value'),
);
ãããèªã¿è¾¼ãã
$hoge = config('hoge.hoge'); var_dump($hoge);
ãªãã NULL ã帰ãããã
ããã£ã¦ã¿ããããã£ãã·ã¥ãåç §ãã¦ãããããã
â« Larave5ã§.envã®å¤ãåå¾ãã
$ rm -f bootstrap/cache/config.php
ä»åã¯ããã§åå¾ã§ããããã«ãªã£ãã
ããã§ã解æ¶ããªãã£ãããä¸è¨ãã¼ã¸ã«ããã°æ¬¡ã®ã³ãã³ããå®è¡ããã°ãããããã
$ php composer.phar install $ php composer.phar dump-autoload $ php artisan clear-compiled $ php artisan optimize $ php artisan config:cache $ php artisan route:cache $ php artisan view:clear
Laravel+Vagrantã§è¤æ°ããã¸ã§ã¯ããåãã
ã¾ãã¯æ°ããããã¸ã§ã¯ããä½ãã
$ composer create-project --prefer-dist laravel/laravel tamae
Homestead.yaml ã«è¿½å ããã
sites: - map: nozomi.local to: /home/vagrant/code/nozomi/public - map: kanae.local to: /home/vagrant/code/kanae/public - map: tamae.local to: /home/vagrant/code/tamae/public
/etc/hosts ã«ãã¹ãåã追å ããã
IPã¢ãã¬ã¹ã¯ãHomestead.yamlã§æå®ãããã®ã
127.0.0.1 localhost 192.168.10.10 nozomi.local kanae.local tamae.local 255.255.255.255 broadcasthost ::1 localhost
provisionãªãã·ã§ã³ãä»ãã¦Vagrantãèµ·åããã
$ vagrant up --provision
ããã§ãããã