コード例 #1
0
 public function getEdit(Request $request, $banner_id)
 {
     $banner = Banner::findOrFail($banner_id);
     $perpage = 12;
     $imgs = Img::where('img_block', '=', 'public')->orderBy('created_at', 'DESC')->simplePaginate($perpage);
     return view('manage.banner.edit', ['TITLE' => '轮播编辑', 'META_KEYWORDS' => META_KEYWORDS, 'META_DESC' => META_DESC, 'PAGE_CODE' => '/manage/banner/edit', 'banner' => $banner, 'imgs' => $imgs]);
 }
コード例 #2
0
 public function getEdit(Request $request, $product_id)
 {
     $product = Product::findOrFail($product_id);
     $perpage = 12;
     $imgs = Img::where('img_block', '=', 'public')->orderBy('created_at', 'DESC')->simplePaginate($perpage);
     return view('manage.product.edit', ['TITLE' => '活动编辑', 'META_KEYWORDS' => META_KEYWORDS, 'META_DESC' => META_DESC, 'PAGE_CODE' => '/manage/product/edit', 'product' => $product, 'imgs' => $imgs]);
 }
コード例 #3
0
 public function getEdit(Request $request, $form_code)
 {
     $form = Form::where('form_code', '=', $form_code)->where('form_type', 'template')->firstOrFail();
     $perpage = 12;
     $imgs = Img::where('img_block', '=', 'public')->orderBy('created_at', 'DESC')->simplePaginate($perpage);
     return view('manage.template.edit', ['TITLE' => '编辑模板:' . $form->form_title, 'META_KEYWORDS' => META_KEYWORDS, 'META_DESC' => META_DESC, 'PAGE_CODE' => '/manage/template/edit/' . $form->form_code, 'form' => $form, 'imgs' => $imgs]);
 }
コード例 #4
0
 public function getEdit(Request $request, $activity_id)
 {
     $activity = Activity::findOrFail($activity_id);
     $perpage = 12;
     $imgs = Img::where('img_block', '=', 'public')->orderBy('created_at', 'DESC')->simplePaginate($perpage);
     return view('manage.activity.edit', ['TITLE' => '活动编辑', 'META_KEYWORDS' => META_KEYWORDS, 'META_DESC' => META_DESC, 'PAGE_CODE' => '/manage/activity/edit', 'activity' => $activity, 'imgs' => $imgs]);
 }
コード例 #5
0
ファイル: AlbumController.php プロジェクト: goyuquan/album
 public function destroy($id)
 {
     $album = Album::findOrFail($id);
     if (Gate::denies('album_authorize', $album)) {
         return "authorize fails";
     }
     foreach ($album->img as $albums) {
         File::delete(['uploads/' . $albums->name, 'uploads/thumbnails/' . 'thumbnail_' . $albums->name, 'uploads/' . $albums->thumbnail, 'uploads/thumbnails/' . $albums->thumbnail, 'uploads/' . $albums->thumbnail2, 'uploads/thumbnails/' . $albums->thumbnail2]);
     }
     Img::where('album_id', $album->id)->delete();
     Album::destroy($id);
     return redirect('/admin/albums/');
 }
コード例 #6
0
ファイル: ImgController.php プロジェクト: verchielxy/jiedenuo
 public function getLibrary(Request $request)
 {
     $perpage = 20;
     $imgs = Img::where('img_block', '=', 'public')->orderBy('created_at', 'DESC')->paginate($perpage);
     return view('manage.img.library', ['TITLE' => '图库', 'META_KEYWORDS' => META_KEYWORDS, 'META_DESC' => META_DESC, 'PAGE_CODE' => '/manage/img/library', 'imgs' => $imgs]);
 }