当前位置: 首页>>代码示例>>PHP>>正文


PHP Property::destroy方法代码示例

本文整理汇总了PHP中Property::destroy方法的典型用法代码示例。如果您正苦于以下问题:PHP Property::destroy方法的具体用法?PHP Property::destroy怎么用?PHP Property::destroy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Property的用法示例。


在下文中一共展示了Property::destroy方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: test_destroying_should_cascade

 public function test_destroying_should_cascade()
 {
     $Property = new Property(array('description' => 'This is a Property'));
     $Picture = $Property->picture->create(array('title' => 'Front'));
     $Property->destroy();
     $this->assertFalse($this->Property->find('first', array('default' => false)));
     $this->assertFalse($this->Picture->find('first', array('default' => false)));
 }
开发者ID:bermi,项目名称:akelos,代码行数:8,代码来源:has_many_specifications.php

示例2: destroy

 /**
  * Remove the specified resource from storage.
  * DELETE /properties/{id}
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     $status = Property::destroy($id);
     return $status ? ['status' => true] : ['status' => false];
 }
开发者ID:sahilkathpal,项目名称:hackcoin,代码行数:12,代码来源:PropertiesController.php

示例3: test_clean_up_dependencies

 public function test_clean_up_dependencies()
 {
     $Property = new Property('description->', 'Luxury Estate');
     $PropertyType = new PropertyType();
     $this->assertTrue($PropertyType =& $PropertyType->create(array('description' => 'Mansion')));
     $Property->property_type->add($PropertyType);
     $this->assertTrue($Property->save());
     $PropertyType =& $PropertyType->findFirstBy('description', 'Mansion');
     $PropertyType->property->load();
     $this->assertEqual($PropertyType->properties[0]->getId(), $Property->getId());
     $this->assertEqual($PropertyType->property->count(), 1);
     $this->assertTrue($Property->destroy());
     $PropertyType =& $PropertyType->findFirstBy('description', 'Mansion');
     $PropertyType->property->load();
     $this->assertTrue(empty($PropertyType->properties[0]));
     $this->assertEqual($PropertyType->property->count(), 0);
 }
开发者ID:joeymetal,项目名称:v1,代码行数:17,代码来源:AkHasAndBelongsToMany.php

示例4: getDestroy

 /**
  * Remove the specified property from storage.
  *
  * @param  int $id
  * @return Response
  */
 public function getDestroy($id)
 {
     Property::destroy($id);
     return Redirect::action('PropertiesController@getIndex');
 }
开发者ID:jonagoldman,项目名称:channelmanager,代码行数:11,代码来源:PropertiesController.php

示例5: destroy

 /**
  * Remove the specified kin from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     $property = Property::findOrFail($id);
     Property::destroy($id);
     Audit::logaudit('Properties', 'delete', 'deleted: ' . $property->name);
     return Redirect::route('Properties.index')->withDeleteMessage('Company Property successfully deleted!');
 }
开发者ID:kenkode,项目名称:xpose,代码行数:13,代码来源:PropertiesController.php

示例6: test_clean_up_dependencies

 public function test_clean_up_dependencies()
 {
     $Property = new Property(array('description' => 'Ruins in Matamon'));
     $this->assertTrue($Property->save());
     $South =& $Property->picture->create(array('title' => 'South views'));
     $this->assertReference($South, $Property->pictures[0]);
     $this->assertFalse($South->isNewRecord());
     $pic_id = $South->getId();
     $Property = new Property($Property->getId());
     $this->assertTrue($Property->destroy());
     $Picture = new Picture();
     $this->assertFalse($Picture->find($pic_id));
 }
开发者ID:joeymetal,项目名称:v1,代码行数:13,代码来源:AkHasMany.php


注:本文中的Property::destroy方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。