php - call to undefined method llluminate\support\facades\request::save() -
trying save input database called requests
the error points requestcontroller.php when data trying saved.this code handle saving data database called requests.
$request = new request; these data trying save:
$request->product_name = $posted['product_name']; $request->product_description = $posted['product_description' ]; $request->email = $posted['email']; $request->user_id = auth::user()->i'd; error reporting code:
$request->save(); why error exception?
request name of facade in laravel. that's why error message says it's looking save() method on illuminate\support\facades\request class. you'll want either namespace request class or rename else. prefer latter option, myself.
besides that, line looks should cause script crash: $request->user_id = auth::user()->i'd; - should ->id;, assume?
Comments
Post a Comment