/** * Show the form for editing the specified resource. * * @param int $id * * @return \Illuminate\Http\Response */ public function edit($id) { $article = $this->articleRepository->getById($id); if ($article === null) { Flash::error('cms.article_does_exists'); return redirect()->route('cms.articles.published'); } $tags = $this->tagRepository->all()->lists('name', 'id'); $selectedTags = $article->tags()->lists('id')->toArray(); $categories = $this->categoryRepository->all()->lists('name', 'id'); return view('cms.articles.edit', compact('article', 'tags', 'categories', 'selectedTags')); }
/** * Display the home resource. * * @return \Illuminate\Http\Response */ public function home() { $industries = $this->industryRepository->all(); return view('ahk.home', compact('industries')); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $categories = $this->categoryRepository->all()->paginate(10); return view('cms.articles.categories.index', compact('categories')); }
/** * Bind data to the view. * * @param View $view * * @return void */ public function compose(View $view) { $view->with('user', Auth::user()); $view->with('locale', App::getLocale()); $view->with('industries', $this->industryRepository->all()); }
/** * Bind data to the view. * * @param View $view * * @return void */ public function compose(View $view) { !session('locale') ?: App::setLocale(session('locale')); $view->with('locale', App::getLocale()); $view->with('industries', $this->industryRepository->all()); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $companies = $this->companyRepository->paginate(4); $industries = $this->industryRepository->all(); return view('ahk.companies.index', compact('companies', 'industries')); }
/** * Show the form for editing the specified resource. * * @param Company $company * * @return \Illuminate\Http\Response */ public function edit(Company $company) { $industries = $this->industryRepository->all()->pluck('name', 'id'); $countries = $this->countryRepository->all()->pluck('name', 'id'); return view('ahk.my.companies.edit', compact('company', 'industries', 'countries')); }