I can think of many errors you could get from this code, but I'm especially curious about the error you're getting. Please enlighten us.
What do you think this code is doing for you. This is the I read it: put all input in $data, print $data, for any element in $data: make a new Activity object, save some input to some variables and never use them, try to save the activity object to the database.
What probably want to do is
public function save(){
$activity = new Activity(Input::all());
$activity->save();
}
Yes, please post the error message you are getting plus any other relevant info. Without it, any answers would be guesses at best.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community