public function getOrder() { if (!ACL::hasPermission('skills', 'edit')) { return redirect(route('skills'))->withErrors(['You don\'t have permission for edit the skill.']); } $skills = Skills::orderBy('sortorder', 'ASC')->addSelect('skillsId')->addSelect('name')->addSelect('sortorder')->get(); return view('admin.skills.order')->with(compact('skills')); }
public function index() { $websiteSettings = \App\Exceptions\Handler::readFile("websiteSettings.json"); $aboutMe = AboutMe::orderBy('sortorder', 'asc')->get(); $experiences = Experience::orderBy('dateStart', 'desc')->get(); $skills = Skills::orderBy('sortorder', 'asc')->get(); $languages = Language::orderBy('sortorder', 'asc')->get(); //foreach($languages as $language): //dd($language->writeName); //endforeach; return view('website.aboutme')->with(compact('websiteSettings', 'aboutMe', 'experiences', 'skills', 'languages')); }