Support the ongoing development of Laravel.io →
Input Database Eloquent
Last updated 2 years ago.
0

Turns out I needed to instantiate a new model...

$comment = new Comments;

$comment->name = Input::get('name');

$comment->comments = Input::get('comments');

$comment->save();

Last updated 2 years ago.
0

Any particular reason for using GET? Database operations should be PUT, POST or DELETE. Also, you're not protected against CSRF.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

deeperDATA deeperdata Joined 18 May 2014

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.

© 2024 Laravel.io - All rights reserved.