Exemplo n.º 1
0
 /**
  * Bootstrap any application services.
  *
  * @return void
  */
 public function boot()
 {
     $menu_right_popular = Blogs::get();
     $menu_right_newest = Blogs::orderBy("id", "desc")->get();
     $menu_right_comment = Comment::all();
     $blog_bottom_footer = Blogs::limit(3)->get();
     view()->share(['menu_right_popular' => $menu_right_popular, 'menu_right_newest' => $menu_right_newest, 'menu_right_comment' => $menu_right_comment, "current_lang" => Session::get("current_lang"), "blog_bottom_footer" => $blog_bottom_footer]);
 }
Exemplo n.º 2
0
 public function index()
 {
     //
     // Thông tin các trang web đã từng làm
     //
     $array_web = [["url" => "http://sua.vn", "img" => "sua.vn.png", "title" => "SUA.VN", "desc" => "Trang web sữa hàng đầu Việt Nam"], ["url" => "http://daivietgroup.net", "img" => "daivietgroup.net.png", "title" => "Daivietgroup", "desc" => "Tập đoàn Đại Việt"], ["url" => "http://cbah.org.vn", "img" => "cbah.org.vn.png", "title" => "CBAH", "desc" => "Hiệp hội doanh nghiệp Trung Quốc"], ["url" => "http://hellobb.vn", "img" => "hellobb.vn.png", "title" => "hellobb.vn", "desc" => "Hệ thống thương hiệu HelloBB"], ["url" => "http://babylovevn.com", "img" => "babylovevn.com.png", "title" => "babylovevn.com", "desc" => "Cửa hàng trực tuyến"], ["url" => "http://bighost.vn", "img" => "bighost.vn.png", "title" => "bighost.vn", "desc" => "Trang web kinh doanh domain & hosting"], ["url" => "http://namsaigon.edu.vn", "img" => "namsaigon.edu.vn.png", "title" => "namsaigon.edu.vn", "desc" => "Trường trung cấp nghề Nam Sài Gòn"], ["url" => "http://thuexechauau.com", "img" => "thuexechauau.com.png", "title" => "thuexechauau.com", "desc" => "Dịch vụ thuê xe"], ["url" => "http://hoancau.com", "img" => "hoancau.com.png", "title" => "hoancau.com", "desc" => "Công ty Hoàn Cầu"], ["url" => "http://ankhanhtech.com.vn", "img" => "ankhanhtech.com.vn.png", "title" => "ankhanhtech.com.vn", "desc" => "Cửa hàng kinh doanh thiết bị dụng cụ"], ["url" => "http://showaglove.co.jp", "img" => "showaglove.co.jp.png", "title" => "showaglove.co.jp", "desc" => "Tập đoàn quốc tế Showa"]];
     $skill_level = ["Laravel Framework" => 3, "Codeigniter" => 5, "Zend Framework" => 3, "Wordpress" => 3, "MySQL" => 4, "PHP" => 5, "CSS(3)" => 4, "HTML(5)" => 4, "Command line" => 4, "JSON" => 5, "XML" => 3, "Bootstrap Framework" => 5, "JQuery" => 5, "Javascript" => 4, "ElasticSearch" => 1, "BEM" => 3, "LESS" => 2, "SASS" => 2, "Method Factory Pattern" => 5, "MVC Pattern" => 4, "Builder Pattern" => 5, "Singleton Pattern" => 5, "Object Orientated Programming" => 4, "SEO" => 3, "UML (Unified Modeling Language)" => 1, "AngularJS" => 1, "Ruby" => 1];
     $rs = Blogs::orderBy("id", "desc")->get();
     $i = 1;
     $j = 1;
     define("PERPAGE_BLOG", 5);
     foreach ($rs as $key => $value) {
         $rs_p[$i][] = $value;
         if ($j % PERPAGE_BLOG == 0) {
             $i++;
         }
         $j++;
     }
     return view("homepage", compact("rs", "array_web", "skill_level", "rs_p"));
 }
Exemplo n.º 3
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $rs = Blogs::orderBy("id", "desc")->get();
     return view("admin.blogs.index", compact("rs"));
 }