php artisan tinkerにおいてどうやったら、extendsしているクラスのメソッドを見ることができるでしょうか?
この場合,ModelをextendsしてるPostからshow で saveメソッドを見ようとしています。
こういうケースでは、tinkerで見ずに、ファイルを追うのかtinkerで見る方法があるのか知りたいです。
よろしくお願いします。
php
1 2>> show App\Post 3 > 7| class Post extends Model 4 8| { 5 9| protected $fillable = ['title','body']; 6 10| } 7 8>>> show save 9InvalidArgumentException with message 'Unknown class or function: save'
php
1 public function save(array $options = []) 2 { 3 $query = $this->newModelQuery(); 4 5 // If the "saving" event returns false we'll bail out of the save and return 6 // false, indicating that the save failed. This provides a chance for any 7 // listeners to cancel save operations if validations fail or whatever. 8 if ($this->fireModelEvent('saving') === false) { 9 return false; 10 }
あなたの回答
tips
プレビュー