Something weird is happening in my production server using CentOS 7 and the problem is... in my local environment I have many applications developed with Laravel 4 and were inst
{{ Form::open(array('method' => 'GET', 'action' => 'CompanyController@search', 'class' => 'f-search')) }}
Try changing 'action'
=> 'buscar'
.
I believe the issue lies on your .htaccess file on the server. The RewriteRule is not properly done. Find the similar line and fix as follows.
RewriteRule ^(.*)$ /index.php?/$1 [QSA]
[QSA] is the changed section
I just did a test locally using the following settings:
// routes.php
Route::get("/test", "AppController@test");
// AppController.php
public function test() {
print_r(Input::get("test"));
return View::make("test");
}
// test.blade.php
<form method="GET" action="{{ URL::to("test")}} ">
<input type="text" name="s" class="form-control">
<input type="submit">
</form>
After pressing Submit
, the url changes to localhost/sotests/test?s=test
and the page returns with "test" printed right above the form.
Some changes, I used URL::to("test")
as my action. I don't know if that will fix your issue, but it worked like a charm for me. Other than that, I also didn't use Laravel's Form
class, but I don't think that would make a difference.
Let me know if this works for you!