Support the ongoing development of Laravel.io →
posted 9 years ago
Requests

I have custom repository pattern file and my ajax working on controller but not working pattern file.

$this->category->search($request-> get('$data);

use Response; public function search($search){

return Response::json(array('name' => 'Steve', 'state' => 'CA')); ## not working echo json_encode(['status' => 'success','html' => 'cihan']); ## working

}

Last updated 2 years ago.
0

What exactly isn't working? Or, what error message are you getting?

0

i cant see anything on console but the codes working $result = $this->category->search($request->get('search')); return $result;

0

Sign in to participate in this thread!

Eventy

Your banner here too?

zelter26 zelter26 Joined 9 Sep 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.