/** * Show the form for creating a new resource. * @return Response */ public function create() { $staff = Staff::orderBy("user_name")->get(); return view('staff-rate.create', ['staff' => $staff]); }
public function index() { $staff = Staff::orderBy('heirarchy')->get(); return view('pages.staff', ['staff' => $staff]); }
public function showNewsDetail($slug, $id) { $data['category'] = Category::with('SubCategory')->orderBy('created_at', 'asc')->get(); $data['comment'] = Comment::where('news_id', $id)->get(); $data['slider'] = Slide::orderBy('created_at', 'asc')->get(); $data['sideslider'] = SideSlider::orderBy('created_at', 'asc')->get(); $data['news'] = News::findOrFail($id); $data['partner'] = Partner::orderBy('created_at', 'asc')->get(); $data['sideNews'] = News::orderBy('created_at', 'desc')->take(3)->skip(0)->get(); $data['album'] = Album::orderBy('created_at', 'asc')->take(12)->skip(0)->get(); $data['staff'] = Staff::orderBy('created_at', 'asc')->take(5)->skip(0)->get(); if ($slug != $data['news']->slug) { return Redirect::route('site.show.news.detail', $data['page']->slug, $id); } return view('site.news-detail', $data); }