Closed georgemjohn closed 2 years ago
Im sorry but what is the difference of an ajax response and json response?
Apparently laravel treats it the same way.
namespace Illuminate\Http\Concerns;
use Illuminate\Support\Str;
trait InteractsWithContentTypes
{
...
public function expectsJson()
{
return ($this->ajax() && ! $this->pjax() && $this->acceptsAnyContentType()) || $this->wantsJson();
}
...
}
Please create a test. Simulate an action with both methods in the same class. jsonResponse and ajaxResponse. I believe one will conflict with the other because both are treated the same by laravel
Hi there 👋
I agree with @leandrodiogenes and struggle to see the value in this PR.
If you wish to try again, please open a new PR with a clear description of why this would improve the package with some tests to make sure it works.
Thank you for your understanding.
Added ajax response method