/** * Run the database seeds. * * @return void */ public function run() { DB::table('faqs'); $faq = new Faq(); $faq->question = "Hoeveel kosten komen er bovenop mijn bod?"; $faq->awnser = "Naast het door u geboden bedrag betaalt u ook nog veilingkosten, 17 % opgeld, en BTW. Het BTW percentage wordt bepaald door de soort goederen die aangeboden worden. U doet bv. een bod van 100€, dan wordt het totaal als volgt berekend: 100€ + 17€(kosten)= 117€ + BTW. Deze berekening krijgt u steeds te zien alvorens u het bod moet bevestigen !!"; $faq->tags = "kosten bod"; $faq->save(); $faq = new Faq(); $faq->question = "Hoe moet ik betalen?"; $faq->awnser = "Wanneer de kavels aan u worden toegewezen, ontvangt u een e-mail met daarin de te betalen som en de betalingsgegevens. U dient dit bedrag dan zo spoedig mogelijk over te schrijven op onze derdenrekening IBAN BE84 1430 6028 1359 BIC GEBABEBB, met de gevraagde vermelding. Bij het afhalen van de goederen dient u een betalingsbewijs voor te leggen. Contant betalen is niet mogelijk!"; $faq->tags = "betalen"; $faq->save(); $faq = new Faq(); $faq->question = "Hoe werkt het afhalen?"; $faq->awnser = "Op de afhaaldag dient u zich aan te melden bij de veilingverantwoordelijke. Hij controleert of de betaling goed werd ontvangen. Breng voor alle zekerheid steeds een bewijs van betaling mee. Indien de betaling werd ontvangen zal iemand u naar uw goederen begeleiden en de factuur overhandigen. U bent verder zelf verantwoordelijk voor het eventuele demonteren en transporteren van de goederen. Indien u de gekochte goederen zelf niet kan komen ophalen, mag u iemand anders laten komen. Hij/zij dient wel de toewijsmail mee te brengen. Indien de kavels, zonder verwittigen,niet werden opgehaald, wordt een gerechtelijke procedure ingezet om de tegoeden te recupereren."; $faq->tags = "afhalen"; $faq->save(); $faq = new Faq(); $faq->question = "Kunnen kavels opgestuurd worden?"; $faq->awnser = "Ja, dat kan. Openbare-verkopen.be werkt met een exclusieve partner, Sibo Delivery, die zich toelegt op het transport van goederen uit onze veilingen. Voor extra info en offertes kan u steeds contact opnemen via sibo.drive@gmail.com met het veilingnummer en de kavelnummers of via hun website."; $faq->tags = "leveren opsturen"; $faq->save(); $faq = new Faq(); $faq->question = "Kan ik goederen retourneren?"; $faq->awnser = "Openbare-verkopen.be neemt geen goederen terug. Veilingen per opbod vallen buiten de wet ‘verkoop op afstand’. Wij raden steeds aan gebruik te maken van de kijkdag(en) om vast te stellen of de kavel aan uw verwachtingen voldoet."; $faq->tags = "retourneren"; $faq->save(); }
public function create(Faq $faq, Request $request) { $set = new Faq(); $set->category = $request->category; $set->question = $request->question; $set->answer = $request->answer; $set->save(); return redirect()->back(); }
public function searchfaq(Request $request) { $input = $request->all(); $query = $input['search']; $faqs = Faq::where('question', 'LIKE', '%' . $query . '%')->get(); return view('faqs-search')->with('faqs', $faqs)->with('query', $query); }
/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { $faq = Faq::findOrFail($id); $faq->delete(); Session::flash('message', 'Successfully Deleted your Data!'); return redirect()->back(); }
/** * Run the database seeds. * * @return void */ public function run() { DB::table('faq')->delete(); for ($i = 0; $i < count($this->items); $i++) { $row = array_combine(['id', 'question', 'answer'], $this->items[$i]); Faq::create($row); } }
/** * Run the database seeds. * * @return void */ public function run() { DB::table('faq_tags')->delete(); for ($i = 0; $i < 30; $i++) { $random_faq = Faq::orderByRaw("RAND()")->first(); FaqTag::create(['faq_id' => $random_faq->id, 'tag_en' => 'en_tag_' . $i, 'tag_nl' => 'nl_tag_' . $i]); } }
public function search(Request $request) { $keyword = $request->get('nombre'); if (trim(urldecode($keyword)) == '') { return response()->json([], 200); } $results = Faq::where('question', 'LIKE', '%' . $keyword . '%')->orderBy('question')->take(3)->get(['id', 'question', 'answer']); return response()->json([$results]); }
/** * Run the database seeds. * * @return void */ public function run() { DB::table('faqs')->delete(); $lorem = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident.'; $questions = [['How to bid?', 'Hoe bieden?'], ['How to sell?', 'Hoe verkopen?'], ['How to buy?', 'Hoe kopen?'], ['How to register?', 'Hoe registreren?'], ['How to ask a question?', 'Hoe een vraag stellen?'], ['What is a watchlist?', 'Wat is een volglijst?'], ['How to use a watchlist?', 'Hoe volglijst gebruiken?']]; foreach ($questions as $q) { Faq::create(['q_en' => $q[0], 'q_nl' => $q[1], 'a_en' => '(English)' . $lorem, 'a_nl' => '(Nederlands)' . $lorem]); } }
public function searchfaq(Request $request) { $search = $request->search; $query = Faq::query(); $query->where('question', 'like', '%' . $search . '%'); $query->orWhere('answer', 'like', '%' . $search . '%'); $faqs = $query->get(); return view('faq', compact('faqs')); }
public function search($lang, Request $request) { $query = $request->search; if ($query == '') { return redirect('nl/faq'); } $cats = Faq::getCats(); $faqs = Faq::search($query); return view('faq.index')->with(['faqs' => $faqs, 'cats' => $cats, 'query' => $query]); }
public function update($id, Request $request) { $faq = Faq::where('id', '=', $id)->first(); if ($faq->validate($request->all())) { $faq->update($request->all()); return redirect(route('listar-faq')); } else { return redirect(route('editar-faq'))->withInput()->withErrors($faq->errors()); } }
public function getFaq($keyword) { $results = Faq::where('question', 'like', '%' . $keyword . '%')->get(); if (count($results) == 0) { $tag = Tag::where('name', 'like', '%' . $keyword . '%')->first(); if ($tag) { $tagname = $tag->name; $results = Faq::whereHas('tags', function ($q) use($tagname) { $q->where('name', '=', $tagname); })->get(); } return $results; } else { return $results; } }
public function homepage() { $user = Auth::user() ?: false; $cars = Car::with('inquiriesCount')->orderBy('domestic', 'asc')->orderBy('name')->get(); $cars1 = $cars->filter(function ($item) { return $item->name == "ВАЗ"; }); $cars2 = $cars->filter(function ($item) { return $item->name != "ВАЗ"; }); $cars = $cars1->merge($cars2); $carsList = $cars->lists('name', 'id')->toArray(); $lastInquiries = Inquiry::with('car', 'city')->orderBy('created_at', 'desc')->paginate(config('vars.inquiries_per_page')); $lastInquiries->setPath('inquiry/index'); Carbon::setLocale(config('app.locale')); $lastNews = News::orderBy('published_at', 'desc')->paginate(config('vars.news_per_page')); $lastNews->setPath('news/index'); $cities = City::lists('name', 'id')->all(); $blocks = Block::all()->keyBy('alias'); $faq = Faq::all(); return view('homepage', compact('user', 'cars', 'carsList', 'lastInquiries', 'lastNews', 'cities', 'blocks', 'faq')); }
public function getFaqs() { $faqs = Faq::all(); $onePiece = $this->onePiece(); return View('FAQ', compact('faqs', 'onePiece')); }
public function ShowFAQ() { $faqs = Faq::all(); $category = DB::table('faq_cat')->orderBy('category')->get(); if (Auth::check()) { return redirect('/FAQ/edit'); } return view('faq', compact('faqs', 'category')); }
/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($id) { Faq::destroy($id); Flash::success("Запись - {$id} удалена"); return redirect(route('admin.faq.index')); }
/** * ให้ค่า instance ของ model ที่ระบุด้วย entity type และ $refId * @param int $type * @param int $refId * @return ActiveRecord */ public static function getInstance($type, $refId, $orderNo = NULL) { $instance = null; switch ($type) { case self::TYPE_ACTIVITY: $instance = Activity::findOne($refId); break; case self::TYPE_BLOG: $instance = Blogs::findOne($refId); break; case self::TYPE_CARTOON: $arr = preg_split('/-/', $refId); $instance = CartoonChapter::findOne(array('cartoonId' => $arr[0], 'chapter' => $arr[1])); break; case self::TYPE_CONTENT: $instance = Content::findOne($refId); break; case self::TYPE_DOCUMENT: $instance = Document::findOne(array('type' => $type, 'refId' => $refId, 'itemNo' => $orderNo)); break; case self::TYPE_FAQ: $instance = Faq::findOne($refId); break; case self::TYPE_FEEDCONTENT: $instance = FeedContent::findOne($refId); break; case self::TYPE_FEED: $instance = Feed::findOne($refId); break; case self::TYPE_GALLERY: $instance = Gallery::findOne($refId); break; case self::TYPE_INFOGRAPHIC: $instance = InfoGraphic::findOne($refId); break; case self::TYPE_LIVEREPORT: $instance = LiveReport::findOne($refId); break; case self::TYPE_LOTTERY: $instance = Lottery::findOne($refId); break; case self::TYPE_BUNNY: case self::TYPE_MEDIA_COLLECTION: $instance = MediaCollection::findOne($refId); break; case self::TYPE_NEWSPAPER: // temporary class for media upload $instance = new stdClass(); $instance->createTime = date('Y-m-d H:i:s'); break; case self::TYPE_NOVEL: $instance = Novel::findOne($refId); break; case self::TYPE_PERSON: $instance = Person::findOne($refId); break; case self::TYPE_SPORT_PLAYER: $instance = Player::findOne($refId); break; case self::TYPE_SPORT_TEAM: $instance = Team::findOne($refId); break; case self::TYPE_QUOTE: $instance = Quote::findOne($refId); break; case self::TYPE_WIDGET: $instance = Widget::findOne($refId); break; case self::TYPE_TV_ANCHOR: $instance = TvAnchor::findOne($refId); break; case self::TYPE_TV_PROGRAM: $instance = TvProgram::findOne($refId); break; case self::TYPE_TV_HIGHLIGHT: $instance = TvHighlight::findOne($refId); break; case self::TYPE_TV_SCHEDULE: $instance = TvSchedule::findOne($refId); break; case self::TYPE_USER: $instance = User::findOne($refId); break; case self::TYPE_VIDEO: $instance = Video::findOne($refId); break; case self::TYPE_VIDEO_PLAYLIST: $instance = VideoPlaylist::findOne($refId); break; case self::TYPE_WATCHTOPIC: $instance = WatchTopic::findOne($refId); break; case self::TYPE_WEATHER: $instance = WeatherForecast::findOne($refId); break; } return $instance; }
/** * Delete the given Faq. * * @param int $id * @return Redirect */ public function getDelete($id = null) { $faq = Faq::destroy($id); // Redirect to the group management page return redirect('admin/faqs')->with('success', Lang::get('message.success.delete')); }
public function run() { $xls = 'database/seeds/seeder.xlsm'; $book = Excel::load($xls, 'UTF-8')->all(); foreach ($book as $sheet) { if ($sheet->getTitle() === 'categories') { Category::truncate(); foreach ($sheet as $row) { $category = Category::create(['id' => $row->id, 'parent_id' => $row->parent_id, 'level' => $row->level, 'type' => $row->type, 'menutype' => $row->menutype, 'title' => $row->title, 'sef' => $row->sef, 'class' => $row->class, 'body' => $row->body, 'image' => $row->image, 'metatitle' => $row->metatitle, 'metakey' => $row->metakey, 'metadesc' => $row->metadesc]); } } if ($sheet->getTitle() === 'furnitura') { Furnitura::truncate(); foreach ($sheet as $row) { if (!empty($row->category_id)) { $menu = Furnitura::create(['id' => $row->id, 'category_id' => $row->category_id, 'cat2_id' => $row->cat2_id, 'title' => $row->title, 'sef' => $row->sef, 'introtext' => $row->introtext, 'fulltext' => $row->fulltext, 'artikul' => $row->artikul, 'otdelka' => $row->otdelka, 'pcs' => $row->pcs, 'description' => $row->description, 'metatitle' => $row->metatitle, 'metakey' => $row->metakey, 'metadesc' => $row->metadesc, 'hits' => $row->hits]); } } } if ($sheet->getTitle() === 'links') { Link::truncate(); foreach ($sheet as $row) { if (!empty($row->category_id)) { $menu = Link::create(['category_id' => $row->category_id, 'title' => $row->title, 'url' => $row->url, 'description' => $row->description, 'version' => $row->version, 'metatitle' => $row->metatitle, 'metakey' => $row->metakey, 'metadesc' => $row->metadesc, 'hits' => $row->hits]); } } } if ($sheet->getTitle() === 'news') { News::truncate(); foreach ($sheet as $row) { if (!empty($row->category_id)) { $menu = News::create(['category_id' => $row->category_id, 'title' => $row->title, 'sef' => $row->sef, 'introtext' => $row->introtext, 'fulltext' => $row->fulltext, 'image' => $row->image, 'metatitle' => $row->metatitle, 'metakey' => $row->metakey, 'metadesc' => $row->metadesc, 'hits' => $row->hits, 'created_at' => $row->created_at]); } } } if ($sheet->getTitle() === 'steklo') { Page::truncate(); foreach ($sheet as $row) { if (!empty($row->category_id)) { $menu = Page::create(['category_id' => $row->category_id, 'title' => $row->title, 'sef' => $row->sef, 'introtext' => $row->introtext, 'fulltext' => $row->fulltext, 'image' => $row->image, 'metatitle' => $row->metatitle, 'metakey' => $row->metakey, 'metadesc' => $row->metadesc, 'hits' => $row->hits]); } } } if ($sheet->getTitle() === 'uslugi') { Uslugi::truncate(); foreach ($sheet as $row) { if (!empty($row->category_id)) { $menu = Uslugi::create(['category_id' => $row->category_id, 'title' => $row->title, 'sef' => $row->sef, 'introtext' => $row->introtext, 'fulltext' => $row->fulltext, 'image' => $row->image, 'metatitle' => $row->metatitle, 'metakey' => $row->metakey, 'metadesc' => $row->metadesc, 'hits' => $row->hits]); } } } if ($sheet->getTitle() === 'faq') { Faq::truncate(); foreach ($sheet as $row) { if (!empty($row->category_id)) { $menu = Faq::create(['category_id' => $row->category_id, 'title' => $row->title, 'sef' => $row->sef, 'introtext' => $row->introtext, 'fulltext' => $row->fulltext, 'image' => $row->image, 'metatitle' => $row->metatitle, 'metakey' => $row->metakey, 'metadesc' => $row->metadesc, 'hits' => $row->hits]); } } } if ($sheet->getTitle() === 'objects') { Object::truncate(); foreach ($sheet as $row) { if (!empty($row->category_id)) { $menu = Object::create(['category_id' => $row->category_id, 'title' => $row->title, 'sef' => $row->sef, 'introtext' => $row->introtext, 'fulltext' => $row->fulltext, 'image' => $row->image, 'metatitle' => $row->metatitle, 'metakey' => $row->metakey, 'metadesc' => $row->metadesc, 'hits' => $row->hits]); } } } } }
public static function getAll() { return Faq::with('faq_tags')->get(); }
public function faq() { $faqs = \App\Faq::where('active', '1')->get(); return view('faq', ['page' => 'faq', 'faqs' => $faqs]); }
/** * FAQS Page * * @return $this */ public function faqs() { $data = ['parentPage' => 'Contact Us', 'page' => 'FQAs', 'title' => 'Teleaus | FAQs Page', 'faqs' => Faq::orderBy('created_at', 'desc')->get()]; return view('faqs')->with($data); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $faqs = Faq::getAll(); // return $faqs; return view('faq', compact('faqs')); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $faq = Faq::all(); return view('faq.index', compact('faq')); }
public function deleteFaq($id) { $faq = Faq::find($id); $faq->delete(); return redirect("admin/faqs")->with("success", "Pitanje je obrisano."); }
public function getAll($where = []) { $faq_get = \App\Faq::where($where); return $faq_get->get(); }
public function faqs() { $page = get_page_contents('faqs'); $faqs = Faq::get(); return view('faqs.index', compact('faqs', 'page')); }
/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($id) { Faq::destroy($id); return redirect('faqs'); }
/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { $object = Model::find($id); if ($object) { $object->delete(); } return redirect()->back(); }
public function getFaq($id) { $faq = Faq::find($id); return $faq; }