public function post_create() { $validation = Validator::make(Input::get(), array('galleryName' => 'required|max:60')); if ($validation->fails()) { return Redirect::to('admin/galleries'); } $galleryName = Input::get('galleryName'); $galleryID = Galleries::create($galleryName); File::mkdir(path('public') . 'images/' . $galleryID); File::mkdir(path('public') . 'images/' . $galleryID . '/thumbs'); return Redirect::to('admin/galleries'); }