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


PHP Files::dropMultiple方法代码示例

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


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

示例1: deleteItem

 public static function deleteItem($id)
 {
     $item = ActeLocaleModel::find($id);
     if ($item) {
         $item->delete();
         Files::dropMultiple(ActeLocaleModel::$filesModule, $id);
     }
 }
开发者ID:vcorobceanu,项目名称:WebAPL,代码行数:8,代码来源:ActeLocaleModel.php

示例2: postDelete

 public function postDelete()
 {
     $id = Input::get('id');
     $post = Post::find($id);
     if ($post->is_trash == 1) {
         PostLang::where('post_id', $id)->delete();
         FeedFieldValue::where('post_id', $id)->delete();
         Files::dropMultiple('post_cover', $id);
         Files::dropMultiple('doc_post_lang', $id);
         Files::dropMultiple('doc_post', $id);
         $post->delete();
         Log::warning("Drop post #{$id}");
     }
     return Redirect::to('feed');
 }
开发者ID:vcorobceanu,项目名称:WebAPL,代码行数:15,代码来源:FeedController.php

示例3: getEmpty

 public function getEmpty()
 {
     return ['no no no'];
     // BAD EMPTY FUNCTION
     // delete posts
     $posts = Post::where('taxonomy_id', 2)->get();
     foreach ($posts as $post) {
         PostLang::where('post_id', $post->id)->delete();
         Files::dropMultiple('post_cover', $post->id);
         Files::dropMultiple('doc_post', $post->id);
         Files::dropMultiple('doc_post_lang', $post->id);
         $post->delete();
     }
     DB::table('apl_feed_field_value')->truncate();
     DB::table('apl_feed_post')->truncate();
     DB::table(PostLang::getTableName())->update(array('text' => ''));
     // delete acte
     $actes = DB::table('apl_acte')->get();
     foreach ($actes as $act) {
         Files::dropMultiple('actelocale', $act->id);
     }
     DB::table('apl_acte')->truncate();
     // calendar
     DB::table('apl_calendar_group')->truncate();
     DB::table('apl_calendar_item')->truncate();
     DB::table('apl_calendar_item_lang')->truncate();
     DB::table('apl_calendar_post')->truncate();
     // complaint
     DB::table('apl_complaint')->truncate();
     // firechat
     DB::table('apl_firechat')->truncate();
     // gallery
     $galls = DB::table('apl_gallery')->get();
     foreach ($galls as $gal) {
         Files::dropMultiple('gallery', $gal->id);
     }
     DB::table('apl_gallery')->truncate();
     DB::table('apl_gallery_post')->truncate();
     // reqs
     $reqs = DB::table('apl_job_requests')->get();
     foreach ($reqs as $req) {
         if ($req->cv_path && file_exists($_SERVER['DOCUMENT_ROOT'] . '/' . $req->cv_path)) {
             @unlink($_SERVER['DOCUMENT_ROOT'] . '/' . $req->cv_path);
         }
     }
     DB::table('apl_job_requests')->truncate();
     // logs
     DB::table('apl_logs')->truncate();
     // newsletter
     DB::table('apl_newsletter')->truncate();
     // persons
     $persons = DB::table('apl_person')->get();
     foreach ($persons as $person) {
         Files::dropMultiple('person', $person->id);
         Files::dropMultiple('person_chat', $person->id);
     }
     DB::table('apl_person_audience')->truncate();
     DB::table('apl_person')->truncate();
     DB::table('apl_person_lang')->truncate();
     DB::table('apl_person_rel')->truncate();
     // polls
     DB::table('apl_poll')->truncate();
     DB::table('apl_poll_answer')->truncate();
     DB::table('apl_poll_answer_lang')->truncate();
     DB::table('apl_poll_question')->truncate();
     DB::table('apl_poll_votes')->truncate();
     // pagefiles
     $pagefiles = DB::table('apl_file')->where('module_name', 'article_cover')->get();
     foreach ($pagefiles as $pf) {
         Files::drop($pf->id);
     }
     DB::table('apl_file')->where('module_name', 'page')->delete();
     // othfiles
     $files = DB::table('apl_file')->where('module_name', 'article_cover')->get();
     foreach ($files as $file) {
         Files::drop($file->id);
     }
     DB::table('apl_file')->where('module_name', 'article_cover')->delete();
     $files = DB::table('apl_file')->where('module_name', 'doc_post_lang')->get();
     foreach ($files as $file) {
         Files::drop($file->id);
     }
     DB::table('apl_file')->where('module_name', 'doc_post_lang')->delete();
     $files = DB::table('apl_file')->where('module_name', 'test')->get();
     foreach ($files as $file) {
         Files::drop($file->id);
     }
     DB::table('apl_file')->where('module_name', 'test')->delete();
     $files = DB::table('apl_file')->where('module_name', 'person')->get();
     foreach ($files as $file) {
         Files::drop($file->id);
     }
     DB::table('apl_file')->where('module_name', 'person')->delete();
     $files = DB::table('apl_file')->where('module_name', 'rewwe')->get();
     foreach ($files as $file) {
         Files::drop($file->id);
     }
     DB::table('apl_file')->where('module_name', 'rewwe')->delete();
     return ['executed'];
 }
开发者ID:vcorobceanu,项目名称:WebAPL,代码行数:100,代码来源:HomeController.php

示例4: deleteperson

 public function deleteperson()
 {
     $id = Input::get('id');
     \PersonModel::where('id', $id)->delete();
     \PersonLangModel::where('person_id', $id)->delete();
     \Files::dropMultiple('person', $id);
     \Files::dropMultiple('person_chat', $id);
     \PersonRelModel::where('person_id', $id)->delete();
     return \Illuminate\Support\Facades\Redirect::to('person/list');
 }
开发者ID:vcorobceanu,项目名称:WebAPL,代码行数:10,代码来源:person.php


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