public function index() { $advice = \SecurityTip::orderBy(DB::raw("RAND()"))->first(); $news = \News::orderBy(DB::raw("RAND()"))->first(); $work = \Work::orderBy(DB::raw("RAND()"))->first(); return View::make('welcome/index', compact('news', 'work', 'advice')); }
public function show($slug) { //$title = Lang::get('admin/blogs/title.blog_show'); $title = "Совет"; $tip = $this->tip->where('slug', $slug)->firstOrFail(); $another_tips = \SecurityTip::orderBy(DB::raw("RAND()"))->take(2)->get(); return View::make('security/show', compact('tip', 'another_tips')); }