/** * Show the application welcome screen to the user. * * @return Response */ public function index() { // sql query to get database size{} $dataSize = DB::select('SELECT round(((data_length + index_length))) "size" FROM information_schema.TABLES WHERE table_schema = "saveurl" AND table_name = "links"'); $numberOfLinks = Link::all()->count(); return view('welcome')->with('numberOfLinks', $numberOfLinks)->with('dataSize', $dataSize[0]->size); }
/** * Display Backend Area. */ public function backend() { $users = User::where('id', '<>', 1)->get(); $categories = Category::all(); $projects = Project::all(); $images = Image::all(); $links = Link::all(); return view('pages/backend/index')->with('users', $users)->with('categories', $categories)->with('projects', $projects)->with('links', $links)->with('images', $images); }
public function index(urlRequest $request) { $search = $request->query('q'); $filter = $this->topic->present()->getTopicFilter(); $topics = $this->topic->getTopicsSearchWithFilter($filter)->search($search)->paginate(20); $nodes = Node::allLevelUp(); $links = Link::all(); $this->setupLayout(); return view('topics.index', compact('topics', 'nodes', 'links')); }
public function compose($view) { $frontend = new Fluent(); if (Auth::check()) { $frontend->user = new UserPresenter(Auth::user()); } $frontend->links = Cache::get('links', function () { $links = least('array', [Link::all()->toArray(), []]); Cache::put('links', $links, 60000); return $links; }); $view->with('frontend', $frontend); }
public function __construct() { $this->tags = Tag::with(['articles' => function ($query) { $query->select('id'); }])->get(); $settings = Setting::lists('value', 'name')->toArray(); $this->setting = (object) $settings; $this->links = Link::all()->sortBy('sort'); /*$this->tags=Tag::select([ 'tags.*', \DB::raw('ifnull(count(article_tag.tag_id),0) as count') ])->join('article_tag','tags.id','=','article_tag.tag_id') ->join('articles','articles.id','=','article_tag.article_id') ->where('articles.deleted_at',null) ->groupBy('article_tag.tag_id') ->get();*/ }
public function compose($view) { $frontend = new Fluent(); $frontend->links = least('array', Link::all()->toArray(), []); $view->with('frontend', $frontend); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $links = Link::all(); return view('goenitz.links.index', ['links' => $links]); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index(Request $request) { //FXMM 03/12/2015- In order to see all links, we make an index function $links = Link::all(); return View::make('links.index')->with('links', $links); }