app/Http/Controllers/FrontController.php
/**
     * Show the application dashboard.
     *
     * @return \Illuminate\Http\Response
     */
Show the application dashboard.
@return \Illuminate\Http\Response
Show the application dashboard . @return \ Illuminate \ Http \ Response
public function index(Request $request)
    {
        $articles=Article::SearchArticle($request->search)
                        ->where('statu_id', '=', '2')
                        ->orderBy('created_at','DESC')->paginate(6);
        SEOMeta::setTitle('Home Blog');
        SEOMeta::setDescription('Blog de la pagina de la empresa');
        SEOMeta::setCanonical(url('/'));
        OpenGraph::setDescription('This is my page description');
        OpenGraph::setTitle('Home');
        OpenGraph::setUrl(url('/'));
        OpenGraph::addProperty('type', 'articles');
        Twitter::setTitle('Home Blog');
        Twitter::setSite('@webstagemx');
        return view('front.home')
                ->with('articles',$articles)
                 ->with('search',$request->search);
    }
public function index ( Request $ request ) { $ articles = Article :: SearchArticle ( $ request -> search ) -> where ( 'statu_id' , '=' , '2' ) -> orderBy ( 'created_at' , 'DESC' ) -> paginate ( 6 ) ; SEOMeta :: setTitle ( 'Home Blog' ) ; SEOMeta :: setDescription ( 'Blog de la pagina de la empresa' ) ; SEOMeta :: setCanonical ( url ( '/' ) ) ; OpenGraph :: setDescription ( 'This is my page description' ) ; OpenGraph :: setTitle ( 'Home' ) ; OpenGraph :: setUrl ( url ( '/' ) ) ; OpenGraph :: addProperty ( 'type' , 'articles' ) ; Twitter :: setTitle ( 'Home Blog' ) ; Twitter :: setSite ( '@webstagemx' ) ; return view ( 'front.home' ) -> with ( 'articles' , $ articles ) -> with ( 'search' , $ request -> search ) ; }
Show the application dashboard.
Show the application dashboard .