Пример #1
0
 public function save()
 {
     Bundle::save($file, $this->_arrayize($this->_data));
 }
 public function create_album()
 {
     $bundle = new Bundle();
     $bundle->artist = Auth::user()->id;
     $bundle->price = Input::get('price');
     $bundle->name = Input::get('name');
     $bundle->save();
     foreach (Input::get('songs') as $v) {
         $list = new BundleList();
         $list->bundle_id = $bundle->id;
         $list->song = $v;
         $list->save();
     }
     return Response::json(['success' => true]);
 }