コード例 #1
0
 public function destroy(Request $request, $galleryId)
 {
     $gallery = Gallery::find($galleryId);
     if (!$gallery) {
         abort(404);
     }
     $gallery->delete();
     $request->session()->flash('success', trans('lara-mvcms::galleries.delete-success'));
     return redirect()->route('lara-mvcms.content-management.galleries.index', ['parent_id' => $request->input('parent_id')]);
 }
コード例 #2
0
ファイル: GallerySeeder.php プロジェクト: hlacos/lara-mvcms
 public function run()
 {
     $root = Gallery::create(['title' => 'root', 'is_directory' => 1, 'parent_id' => null]);
 }