Drafts

laravel で 多様されているマジックメソッド PHPの「マジックメソッド」とは――「__set()」「__get()」「__invoke()」の使い方 (1/2) https://www.atmarkit.co.jp/ait/articles/1804/05/news008.html PHP マジッ
0001-01-01
1 min read
ぺちぱーのよくばりセット https://qiita.com/rhap/items/a5c4ce4b54d66235d911
0001-01-01
1 min read
メタプログラミング 関数に渡された引数を取得 - func_get_arg関数、func_get_args関数 https://webkaru.net/php/function-func-get-arg/ http://blog.yuyat.jp/archives/197 ここで書かれていることはlaravelのヘ
0001-01-01
1 min read
Mockeryでメソッドの引数にオブジェクトを渡したい場合 https://qiita.com/aminevsky/items/692491e0677fe872de3c Mockery with() でメソッドがObjectを渡す検証でNoMatchingExpectationExce
0001-01-01
1 min read
PHP/Laravel で null の可能性がある値を optional や Null合体演算子 ?? を使って安全に取り扱う https://r17n.page/2019/10/31/php-laravel-null-guard-using-optional-and/ 【Laravel】optionalヘルパー関数でErrorException :
0001-01-01
1 min read
デモモード時に認証のモジュールを入れ替える また、DBの接続先を切り替える 一定時間後にログアウトする。 DBをクリアする laravelの理解に欠かせない フ
0001-01-01
1 min read
PHP8の新機能をPHP内部コードのテストphptから読む https://speakerdeck.com/hgsgtk/learn-php8-by-reading-phpt match式など
0001-01-01
1 min read
メソッドチェーン SQLの組み立て。 https://medium.com/swlh/laravel-the-hidden-pipeline-part-1-a4ae91fc55a4 https://darkghosthunter.medium.com/laravel-the-hidden-pipeline-part-2-2c837e17a41e ルートモデルバインディングってどうやって解決しているのか気になったのでコードの奥地にでかけてみた https://qiita.com/wim/items/764a7d7405d32dcb26c8 Laravel
0001-01-01
1 min read
ReflectionClass::newInstanceArgs $members = array('YJSNPI', 'MUR', 'KMR'); $reflection = new ReflectionClass('KarateTeam'); $team = $reflection->newInstanceArgs($members); $team->display(); // YJSNPI, MUR, KMR https://www.php.net/manual/ja/book.reflection.php PHPでリフレクション https://blog.asial.co.jp/751 PHPでアノテーション http://koriym.github.io/2012/02/php-annotation/ <?php namespace animal; require_once 'Cat.php'; require_once 'Dog.php'; $classes = [ 'animal\Cat', 'animal\Dog' ]; foreach ($classes as $class) { $reflClass = new \ReflectionClass($class); $animal = $reflClass->newInstance(); $animal->bark() ; echo "\n"; }
0001-01-01
1 min read
Laravel で Service 層を取り入れるときに検討したいこと https://qiita.com/nunulk/items/6b7a7bbda17192f6b2f5
0001-01-01
1 min read