teratail header banner
teratail header banner
質問するログイン新規登録

回答編集履歴

2

修正

2019/07/07 16:59

投稿

toll_tree
toll_tree

スコア199

answer CHANGED
@@ -1,2 +1,2 @@
1
1
  sakura_hanaさんにアドバイスを頂き、withErrorsメソッドが存在しているオブジェクトを特定することができました。
2
- redirect('post/create')の返り値が、RedirectResponseオブジェクトだった為、method_existsにて、```$a = redirect('/post/create');var_dump(method_exists($a, 'withErrors'));```こちらのように検証してみましたらtrueとなった為、withErrorsがRedirectResponseオブジェクトに存在しているこが、確認できました。
2
+ redirect('post/create')の返り値が、RedirectResponseオブジェクトだった為、method_existsにて、```$a = redirect('/post/create');var_dump(method_exists($a, 'withErrors'));```こちらのように検証してみましたらtrueとなった為、withErrorsがRedirectResponseオブジェクトに存在しているこが、確認できました。

1

修正

2019/07/07 16:59

投稿

toll_tree
toll_tree

スコア199

answer CHANGED
@@ -1,2 +1,2 @@
1
1
  sakura_hanaさんにアドバイスを頂き、withErrorsメソッドが存在しているオブジェクトを特定することができました。
2
- redirect('post/create')の返り値が、RedirectResponseオブジェクトだった為、method_existsにて、```$a = redirect('/post/create');var_dump(method_exists($a, 'withErrors'));```こちらのように検証してみましたらtrueとなった為、withErrorsがRedirectResponseオブジェクトに存在しているこが確認できました。
2
+ redirect('post/create')の返り値が、RedirectResponseオブジェクトだった為、method_existsにて、```$a = redirect('/post/create');var_dump(method_exists($a, 'withErrors'));```こちらのように検証してみましたらtrueとなった為、withErrorsがRedirectResponseオブジェクトに存在しているこが確認できました。