public function destroy($id)
 {
     $attribute = Attribute::find($id);
     $attribute->types()->detach();
     $attribute->delete();
     Session::flash('message', 'Attribute deleted.');
     return Redirect::back();
 }
Exemplo n.º 2
0
 public function edit($id)
 {
     $type = Type::find($id);
     $attributes = Attribute::lists('name', 'id');
     return \View::make('admin::type.edit')->with(array('type' => $type, 'attributes' => $attributes));
 }