@@ -76,6 +76,9 @@ |
||
76 | 76 | '<meta name="theme-color" content="' . $colors['theme'] . '">'; |
77 | 77 | } |
78 | 78 | |
79 | + /** |
|
80 | + * @param string $view |
|
81 | + */ |
|
79 | 82 | public static function make (array $details, $view = null) |
80 | 83 | { |
81 | 84 | $defaults = [ |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | // DIR for icons |
11 | 11 | const FAVICONS = '/img/icons'; |
12 | 12 | |
13 | - public static function generateSEO (array $page) |
|
13 | + public static function generateSEO(array $page) |
|
14 | 14 | { |
15 | 15 | SEO::metatags() |
16 | 16 | ->setTitleDefault($page['title-description']) |
@@ -25,14 +25,14 @@ discard block |
||
25 | 25 | ->addMeta('X-UA-Compatible', 'IE=edge', 'http-equiv') |
26 | 26 | ->addMeta('viewport', 'width=device-width, initial-scale=1, shrink-to-fit=no'); |
27 | 27 | SEO::opengraph() |
28 | - ->setTitle($page['title'] . $page['title-spacer'] . $page['title-description']) |
|
28 | + ->setTitle($page['title'].$page['title-spacer'].$page['title-description']) |
|
29 | 29 | ->setDescription($page['description']) |
30 | 30 | ->setUrl(Request::url()) |
31 | 31 | ->addProperty('locale', 'en_US') |
32 | 32 | ->addProperty('type', 'website'); |
33 | 33 | SEO::twitter() |
34 | 34 | ->setSite($page['twitter']) |
35 | - ->setTitle($page['title'] . $page['title-spacer'] . $page['title-description']) |
|
35 | + ->setTitle($page['title'].$page['title-spacer'].$page['title-description']) |
|
36 | 36 | ->setDescription($page['description']) |
37 | 37 | ->setType('summary') |
38 | 38 | ->setUrl(Request::url()); |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | } |
46 | 46 | } |
47 | 47 | |
48 | - public static function favicon () { |
|
48 | + public static function favicon() { |
|
49 | 49 | $colors = [ |
50 | 50 | 'safari-pinned' => '#5bbad5', |
51 | 51 | 'ms-tile' => '#da532c', |
@@ -53,30 +53,30 @@ discard block |
||
53 | 53 | ]; |
54 | 54 | |
55 | 55 | return |
56 | - '<link rel="apple-touch-icon" sizes="57x57" href="' . asset(self::FAVICONS . '/apple-touch-icon-57x57.png') . '">' . |
|
57 | - '<link rel="apple-touch-icon" sizes="60x60" href="' . asset(self::FAVICONS . '/apple-touch-icon-60x60.png') . '">' . |
|
58 | - '<link rel="apple-touch-icon" sizes="72x72" href="' . asset(self::FAVICONS . '/apple-touch-icon-72x72.png') . '">' . |
|
59 | - '<link rel="apple-touch-icon" sizes="76x76" href="' . asset(self::FAVICONS . '/apple-touch-icon-76x76.png') . '">' . |
|
60 | - '<link rel="apple-touch-icon" sizes="114x114" href="' . asset(self::FAVICONS . '/apple-touch-icon-114x114.png') . '">' . |
|
61 | - '<link rel="apple-touch-icon" sizes="120x120" href="' . asset(self::FAVICONS . '/apple-touch-icon-120x120.png') . '">' . |
|
62 | - '<link rel="apple-touch-icon" sizes="144x144" href="' . asset(self::FAVICONS . '/apple-touch-icon-144x144.png') . '">' . |
|
63 | - '<link rel="apple-touch-icon" sizes="152x152" href="' . asset(self::FAVICONS . '/apple-touch-icon-152x152.png') . '">' . |
|
64 | - '<link rel="apple-touch-icon" sizes="180x180" href="' . asset(self::FAVICONS . '/apple-touch-icon-180x180.png') . '">' . |
|
65 | - '<link rel="icon" type="image/png" href="' . asset(self::FAVICONS . '/favicon-16x16.png') . '" sizes="16x16">' . |
|
66 | - '<link rel="icon" type="image/png" href="' . asset(self::FAVICONS . '/favicon-32x32.png') . '" sizes="32x32">' . |
|
67 | - '<link rel="icon" type="image/png" href="' . asset(self::FAVICONS . '/favicon-96x96.png') . '" sizes="96x96">' . |
|
68 | - '<link rel="icon" type="image/png" href="' . asset(self::FAVICONS . '/favicon-194x194.png') . '" sizes="194x194">' . |
|
69 | - '<link rel="icon" type="image/png" href="' . asset(self::FAVICONS . '/android-chrome-192x192.png') . '" sizes="192x192">' . |
|
70 | - '<link rel="manifest" href="' . asset(self::FAVICONS . '/manifest.json') . '">' . |
|
71 | - '<link rel="mask-icon" href="' . asset(self::FAVICONS . '/safari-pinned-tab.svg') . '" color="' . $colors['safari-pinned'] . '">' . |
|
72 | - '<link rel="shortcut icon" href="' . asset(self::FAVICONS . '/favicon.ico') . '">' . |
|
73 | - '<meta name="msapplication-TileColor" content="' . $colors['ms-tile'] . '">' . |
|
74 | - '<meta name="msapplication-TileImage" content="' . asset(self::FAVICONS . '/mstile-144x144.png') . '">' . |
|
75 | - '<meta name="msapplication-config" content="' . asset(self::FAVICONS . '/browserconfig.xml') . '">' . |
|
76 | - '<meta name="theme-color" content="' . $colors['theme'] . '">'; |
|
56 | + '<link rel="apple-touch-icon" sizes="57x57" href="'.asset(self::FAVICONS.'/apple-touch-icon-57x57.png').'">'. |
|
57 | + '<link rel="apple-touch-icon" sizes="60x60" href="'.asset(self::FAVICONS.'/apple-touch-icon-60x60.png').'">'. |
|
58 | + '<link rel="apple-touch-icon" sizes="72x72" href="'.asset(self::FAVICONS.'/apple-touch-icon-72x72.png').'">'. |
|
59 | + '<link rel="apple-touch-icon" sizes="76x76" href="'.asset(self::FAVICONS.'/apple-touch-icon-76x76.png').'">'. |
|
60 | + '<link rel="apple-touch-icon" sizes="114x114" href="'.asset(self::FAVICONS.'/apple-touch-icon-114x114.png').'">'. |
|
61 | + '<link rel="apple-touch-icon" sizes="120x120" href="'.asset(self::FAVICONS.'/apple-touch-icon-120x120.png').'">'. |
|
62 | + '<link rel="apple-touch-icon" sizes="144x144" href="'.asset(self::FAVICONS.'/apple-touch-icon-144x144.png').'">'. |
|
63 | + '<link rel="apple-touch-icon" sizes="152x152" href="'.asset(self::FAVICONS.'/apple-touch-icon-152x152.png').'">'. |
|
64 | + '<link rel="apple-touch-icon" sizes="180x180" href="'.asset(self::FAVICONS.'/apple-touch-icon-180x180.png').'">'. |
|
65 | + '<link rel="icon" type="image/png" href="'.asset(self::FAVICONS.'/favicon-16x16.png').'" sizes="16x16">'. |
|
66 | + '<link rel="icon" type="image/png" href="'.asset(self::FAVICONS.'/favicon-32x32.png').'" sizes="32x32">'. |
|
67 | + '<link rel="icon" type="image/png" href="'.asset(self::FAVICONS.'/favicon-96x96.png').'" sizes="96x96">'. |
|
68 | + '<link rel="icon" type="image/png" href="'.asset(self::FAVICONS.'/favicon-194x194.png').'" sizes="194x194">'. |
|
69 | + '<link rel="icon" type="image/png" href="'.asset(self::FAVICONS.'/android-chrome-192x192.png').'" sizes="192x192">'. |
|
70 | + '<link rel="manifest" href="'.asset(self::FAVICONS.'/manifest.json').'">'. |
|
71 | + '<link rel="mask-icon" href="'.asset(self::FAVICONS.'/safari-pinned-tab.svg').'" color="'.$colors['safari-pinned'].'">'. |
|
72 | + '<link rel="shortcut icon" href="'.asset(self::FAVICONS.'/favicon.ico').'">'. |
|
73 | + '<meta name="msapplication-TileColor" content="'.$colors['ms-tile'].'">'. |
|
74 | + '<meta name="msapplication-TileImage" content="'.asset(self::FAVICONS.'/mstile-144x144.png').'">'. |
|
75 | + '<meta name="msapplication-config" content="'.asset(self::FAVICONS.'/browserconfig.xml').'">'. |
|
76 | + '<meta name="theme-color" content="'.$colors['theme'].'">'; |
|
77 | 77 | } |
78 | 78 | |
79 | - public static function make (array $details, $view = null) |
|
79 | + public static function make(array $details, $view = null) |
|
80 | 80 | { |
81 | 81 | $defaults = [ |
82 | 82 | 'title' => 'Home', |
@@ -100,8 +100,8 @@ discard block |
||
100 | 100 | } |
101 | 101 | } |
102 | 102 | |
103 | - public static function get () |
|
103 | + public static function get() |
|
104 | 104 | { |
105 | - return str_replace(PHP_EOL, '', SEO::generate()) . self::favicon(); |
|
105 | + return str_replace(PHP_EOL, '', SEO::generate()).self::favicon(); |
|
106 | 106 | } |
107 | 107 | } |
108 | 108 | \ No newline at end of file |
@@ -7,23 +7,23 @@ |
||
7 | 7 | |
8 | 8 | class AuthController extends Controller |
9 | 9 | { |
10 | - public function __construct () { |
|
10 | + public function __construct() { |
|
11 | 11 | $this->middleware('guest'); |
12 | 12 | } |
13 | 13 | |
14 | - public function showLoginForm () { |
|
14 | + public function showLoginForm() { |
|
15 | 15 | return view('Blue::auth.login'); |
16 | 16 | } |
17 | 17 | |
18 | - public function postLoginForm () { |
|
18 | + public function postLoginForm() { |
|
19 | 19 | return 'Posted!'; |
20 | 20 | } |
21 | 21 | |
22 | - public function showRegisterForm () { |
|
22 | + public function showRegisterForm() { |
|
23 | 23 | return view('Blue::auth.register'); |
24 | 24 | } |
25 | 25 | |
26 | - public function postRegisterForm () { |
|
26 | + public function postRegisterForm() { |
|
27 | 27 | return 'Posted!'; |
28 | 28 | } |
29 | 29 | } |
30 | 30 | \ No newline at end of file |
@@ -11,7 +11,7 @@ |
||
11 | 11 | |
12 | 12 | class PagesController extends Controller |
13 | 13 | { |
14 | - public function page ($page = null) { |
|
14 | + public function page($page = null) { |
|
15 | 15 | if (is_null($page)) { |
16 | 16 | return SEO::make([], 'Blue::home'); |
17 | 17 | } |
@@ -7,15 +7,15 @@ |
||
7 | 7 | |
8 | 8 | class AdminController extends Controller |
9 | 9 | { |
10 | - public function __construct () { |
|
10 | + public function __construct() { |
|
11 | 11 | $this->middleware('auth'); |
12 | 12 | } |
13 | 13 | |
14 | - public function index () { |
|
14 | + public function index() { |
|
15 | 15 | return redirect('admin/dashboard'); |
16 | 16 | } |
17 | 17 | |
18 | - public function showDashboard () { |
|
18 | + public function showDashboard() { |
|
19 | 19 | return view('Blue::admin.dashboard'); |
20 | 20 | } |
21 | 21 | } |
22 | 22 | \ No newline at end of file |
@@ -5,14 +5,14 @@ |
||
5 | 5 | |
6 | 6 | Route::group(['namespace' => '\\MeestorHok\\Blue\\Http\\Controllers'], function() |
7 | 7 | { |
8 | - Route::group(['middleware' => SiteDoesntExistMiddleware::class], function () |
|
8 | + Route::group(['middleware' => SiteDoesntExistMiddleware::class], function() |
|
9 | 9 | { // if the user hasn't created a site yet |
10 | 10 | Route::get('new', 'SiteController@showCreateForm'); |
11 | 11 | }); |
12 | 12 | |
13 | - Route::group(['middleware' => SiteExistsMiddleware::class], function () |
|
13 | + Route::group(['middleware' => SiteExistsMiddleware::class], function() |
|
14 | 14 | { // At least one site exists |
15 | - Route::group(['prefix' => 'admin'], function () |
|
15 | + Route::group(['prefix' => 'admin'], function() |
|
16 | 16 | { |
17 | 17 | Route::get('/', 'AdminController@index'); |
18 | 18 | Route::get('dashboard', 'AdminController@showDashboard'); |