// Works fine, returns array of objects $categories = Model_Category::find('all'); // Returns only first object $categories = Model_Category::find(array(1, 2));
$selected = array(); foreach (Input::post('category') as $category_id) { $selected[] = Model_Category::find($category_id); } $website->categories = $selected; $website->save();
$selected = Model_Category::query()->where('category_id', 'IN', Input::post('category'))->get();
It looks like you're new here. If you want to get involved, click one of these buttons!