本文整理汇总了PHP中Eloquent::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP Eloquent::delete方法的具体用法?PHP Eloquent::delete怎么用?PHP Eloquent::delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Eloquent
的用法示例。
在下文中一共展示了Eloquent::delete方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: delete
public function delete()
{
$this->handle_before_destroy();
$result = parent::delete();
$this->update_later_balance();
return $result;
}
示例2: delete
/**
* Deletes a blog post and all
* the associated comments.
*
* @return bool
*/
public function delete()
{
// Delete the comments
$this->comments()->delete();
// Delete the blog post
return parent::delete();
}
示例3: delete
public function delete()
{
$this->tabs()->delete();
$this->fields()->delete();
$this->requests()->delete();
return parent::delete();
}
示例4: delete
public function delete()
{
// delete all related blocks
$this->blocks()->delete();
// delete the grid
return parent::delete();
}
示例5: delete
public function delete()
{
foreach ($this->comments as $comment) {
$comment->delete();
}
return parent::delete();
}
示例6: delete
public function delete()
{
if (File::exists($this->getPath())) {
File::deleteDirectory($this->getPath());
}
parent::delete();
}
示例7: delete
/**
* Delete Category & related Albums
*
* @return bool
*/
public function delete()
{
$albums = $this->albums;
foreach ($albums as $album) {
$album->delete();
}
return parent::delete();
}
示例8: delete
/**
* Delete Album & related Images
*
* @return bool
*/
public function delete()
{
$images = $this->images;
foreach ($images as $image) {
$image->delete();
}
return parent::delete();
}
示例9: delete
public function delete()
{
$id = $this->id;
if (!parent::delete()) {
return false;
}
return !$this->find($id) ? true : false;
}
示例10: delete
public function delete()
{
foreach ($this->todos as $todo) {
$todo->delete();
}
$user->organizations()->detach();
parent::delete();
}
示例11: delete
public function delete()
{
// Borra todos los comentarios
foreach ($this->downloads as $download) {
$download->delete();
}
// Borramos el Post
return parent::delete();
}
示例12: delete
public function delete()
{
// Delete the details
$this->seeker()->delete();
// Delete the details
$this->writer()->delete();
// Delete the request
return parent::delete();
}
示例13: delete
public function delete()
{
// Borra todos los comentarios
foreach ($this->programmes as $programme) {
$programme->delete();
}
// Borramos el Post
return parent::delete();
}
示例14: delete
public function delete()
{
// Borra todos los comentarios
foreach ($this->photos as $photo) {
\File::delete($photo->image_url);
$photo->delete();
}
// Borramos el Post
return parent::delete();
}
示例15: delete
public function delete()
{
if ($this->id === $this->currentUser()->id) {
return false;
}
$id = $this->id;
Activity::log(array('contentID' => $this->id, 'contentType' => 'account_deleted', 'description' => $this->id, 'details' => '', 'updated' => $this->currentUser()->id ? true : false));
Event::fire('controller.user.delete', array($this));
if (!parent::delete()) {
return false;
}
return !$this->find($id) ? true : false;
}