I recommend that you don't use the Laravelcollective and write regular html for your forms instead. They will be much easier to debug.
The problem is most likely in the form itself.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello,
i just started programming with Laravel 7 and i have a strange problem with requests.
I built a Form with laravelcollective to submit new series and set the form action to "store" in the "SeriesController", but if i do so i don't get the formdata by $request->all(). Only $request->getContent() shows me a string with the data. But $request->all() is empty.
The strange thing is, if i set the form action to create and put a route for post in the web.php, i get the data. $request->all() is filled. But i want to handle the saving process in the store action :/
It would be very nice if somebody could tell me where my mistake is or give me a hint on how to solve the problem. I'm out of ideas.
web.php:
Route::resources([
'series' => 'SeriesController']
);
create.blade.php aka the form:
{!! Form::open(['action' => 'SeriesController@store', 'method' => 'post']) !!} <br />
#some form fields#
{!! Form::close() !!}
The series controller:
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Validator;
use App\Series;
use Barryvdh\Debugbar\Facade as Debugbar;
class SeriesController extends Controller
{
...
public function create(Request $request){
Debugbar::info($request->all());
return view('Series/create');
}
public function store(Request $request){
Debugbar::info($request->getContent());
Debugbar::info($request->all());
//return Redirect::action('SeriesController@index')
}
}
I hope i put in all necessary information.
Hopefully KathrinH
I always use $request->author instead of $request->input('author') the few times I use the $request object
I never use $request->all() because that can potentially be quite dangerous if you don't know what you are doing.
And you should always validate the data sent before you store it.
I use this in one of my projects.
public function store(Request $request)
{
$artist = $request->validate([
'name' => 'required|unique:artists,name'
'slug' => 'nullable'
]);
$artist['slug'] = Str::slug($artist['name']);
Artist::create($artist);
}
I work with the validated array and not the request object once it passed the validations. That way I know that the data is correct.
Please or to participate in this conversation.