@@ -66,7 +66,7 @@ public static function avgmax($id)
6666 return  $ arrfinal ;
6767 }
6868 public  static  function  gettags (){
69-  return  Content::select ('slug ' )->limit (6 )->get ();
69+  return  Content::select ('id '  ,  ' title ' ,  ' image ' ,  ' description ' ,  ' slug ' )->limit (6 )->get ();
7070 }
7171// public static function tagcount(){ 
7272// return Content::select('slug')->limit(6)->get(); 
@@ -75,11 +75,11 @@ public static function gettags(){
7575 // 
7676 public  function  notContent ($ id , $ slug ){
7777 $ data  = Content::find ($ id );
78-  $ tags  = Content::select ('id ' , 'title ' , 'image ' , 'description ' , 'slug ' )->limit (5 )->inRandomOrder ()->get ();
78+ //  $tags = Content::select('id', 'title', 'image', 'description', 'slug')->limit(5)->inRandomOrder()->get();
7979 $ datalist  = Content::where ('category_id ' ,$ id )->get ();
8080 $ reviews  = Review::where ('content_id ' , $ id )->get ();
8181 $ picked  = Content::select ('id ' , 'title ' , 'image ' , 'description ' , 'slug ' , 'created_at ' )->limit (6 )->get ();
82-  return  view ('home.not-content_detail ' , ['data '  => $ data ,'datalist '  => $ datalist , 'reviews ' =>$ reviews , 'picked ' =>$ picked, ' tags ' => $ tags  ]);
82+  return  view ('home.not-content_detail ' , ['data '  => $ data ,'datalist '  => $ datalist , 'reviews ' =>$ reviews , 'picked ' =>$ picked ]);
8383 }
8484 public  function  getcontent (Request   $ request ){
8585 if ($ request ->input ('search ' )){ $ search  =$ request ->input ('search ' );}
@@ -102,26 +102,26 @@ public function contentlist($search){
102102
103103 }
104104 public  function  allnotes (){
105- 
105+   $ setting  = Setting:: first (); 
106106 $ datalist  = Content::all ();
107-  $ tags  = Content::select ('id ' , 'title ' , 'image ' , 'description ' , 'slug ' )->limit (5 )->inRandomOrder ()->get ();
107+ //  $tags = Content::select('id', 'title', 'image', 'description', 'slug')->limit(5)->inRandomOrder()->get();
108108 $ rand  = Content::select ('id ' ,'category_id ' , 'title ' , 'image ' , 'description ' , 'slug ' ,'created_at ' ,'user_id ' )->limit (8 )->inRandomOrder ()->get ();
109-  return  view ('home.all_notes ' , ['datalist '  => $ datalist ,'rand ' =>$ rand ,' tags ' =>$ tags  ]);
109+  return  view ('home.all_notes ' , ['datalist '  => $ datalist ,'rand ' =>$ rand ,  ' setting ' =>$ setting  ]);
110110
111111 }
112112 public  function  categorycontents ($ id , $ slug ){
113113 $ datalist  = Content::where ('category_id ' ,$ id )->get ();
114114 $ data  = Category::find ($ id );
115115// print_r($data); 
116116// exit(); 
117-  $ tags  = Content::select ('id ' , 'title ' , 'image ' , 'description ' , 'slug ' )->limit (5 )->inRandomOrder ()->get ();
117+ //  $tags = Content::select('id', 'title', 'image', 'description', 'slug')->limit(5)->inRandomOrder()->get();
118118 $ rand  = Content::select ('id ' ,'category_id ' , 'title ' , 'image ' , 'description ' , 'slug ' ,'created_at ' ,'user_id ' )->limit (8 )->inRandomOrder ()->get ();
119-  return  view ('home.category_content ' , ['data '  => $ data , 'datalist '  => $ datalist ,'rand ' =>$ rand,  ' tags ' => $ tags  ]);
119+  return  view ('home.category_content ' , ['data '  => $ data , 'datalist '  => $ datalist ,'rand ' =>$ rand ]);
120120 }
121121
122122
123123 public  function  index (){
124-  $ tags  = Content::select ('id ' , 'title ' , 'image ' , 'description ' , 'slug ' )->limit (5 )->inRandomOrder ()->get ();
124+ //  $tags = Content::select('id', 'title', 'image', 'description', 'slug')->limit(5)->inRandomOrder()->get();
125125 $ setting  = Setting::first ();
126126 $ slider  = Content::select ('id ' , 'title ' , 'image ' , 'description ' , 'slug ' )->limit (4 )->get ();
127127 $ daily  = Content::select ('id ' ,'title ' , 'image ' , 'description ' , 'slug ' ,'user_id ' )->limit (6 )->inRandomOrder ()->get ();
@@ -135,21 +135,21 @@ public function index(){
135135 'daily ' =>$ daily ,
136136 'last ' =>$ last ,
137137 'picked ' =>$ picked ,
138-   ' tags '  =>  $ tags 
138+ 
139139 ];
140140 return  view ('home.index ' , $ data );
141141 }
142142//Pages start 
143143 public  function  aboutus (){
144144 $ setting  = Setting::first ();
145-  $ tags  = Content::select ('id ' , 'title ' , 'image ' , 'description ' , 'slug ' )->limit (5 )->inRandomOrder ()->get ();
146-  return  view ('home.aboutus ' , ['setting ' =>$ setting, ' tags ' => $ tags  ]);
145+ //  $tags = Content::select('id', 'title', 'image', 'description', 'slug')->limit(5)->inRandomOrder()->get();
146+  return  view ('home.aboutus ' , ['setting ' =>$ setting ]);
147147
148148 }
149149 public  function  references (){
150150 $ setting  = Setting::first ();
151-  $ tags  = Content::select ('id ' , 'title ' , 'image ' , 'description ' , 'slug ' )->limit (5 )->inRandomOrder ()->get ();
152-  return  view ('home.references ' , ['setting ' =>$ setting, ' tags ' => $ tags  ]);
151+ //  $tags = Content::select('id', 'title', 'image', 'description', 'slug')->limit(5)->inRandomOrder()->get();
152+  return  view ('home.references ' , ['setting ' =>$ setting ]);
153153
154154 }
155155 public  function  faq (){
@@ -161,8 +161,8 @@ public function faq(){
161161 }
162162 public  function  contact (){
163163 $ setting  = Setting::first ();
164-  $ tags  = Content::select ('id ' , 'title ' , 'image ' , 'description ' , 'slug ' )->limit (5 )->inRandomOrder ()->get ();
165-  return  view ('home.contact ' , ['setting ' =>$ setting, ' tags ' => $ tags  ]);
164+ //  $tags = Content::select('id', 'title', 'image', 'description', 'slug')->limit(5)->inRandomOrder()->get();
165+  return  view ('home.contact ' , ['setting ' =>$ setting ]);
166166 }
167167 public  function  sendmessage (Request   $ request )
168168 {
0 commit comments