how to save checkbox value to database ?
my view code:
<input type="checkbox" name="checkbox" id={{$cat->id}} value={{$cat->id}}>
my controller code:
public function submitArticle(){
$article = new Post();
$article->title= Input::get('title');
$article->body= Input::get('body');
$article->cat = Input::get('checkbox');
$article->save();
$articleId = $article->id;
return $articleId;
}