I'm getting the following error on my post method. I have a Laravel API and a Angular frontend.
Argument 1 passed to Illuminate\Database\Grammar::parameterize() must be of the type array, integer given, called in /Users/andre/Docume
Here is the create function.
public function store($userid, PropertyRequest $request)
{
$user = User::find($userid);
$advert = $user->property()->create($request->all());
return response()->json($advert);
}
Here is the route.
Route::prefix('advertisement')->group(function () {
Route::post('{id}/store', 'API\PropertyController@store');
});
The userId is being passed to the route from the Angular application.
Any idea what the issue may be?
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2HPVIJX
via IFTTT
Aucun commentaire:
Enregistrer un commentaire