├── src ├── Console │ ├── stubs │ │ └── make │ │ │ ├── routes.stub │ │ │ └── views │ │ │ └── example.stub │ └── LitepieInstall.php ├── Helpers │ └── Litepie.php ├── Traits │ └── LiteSeed.php ├── Facades │ └── Litepie.php ├── Http │ └── Controllers │ │ ├── LitepieComposer.php │ │ ├── LitepieController.php │ │ └── Controller.php ├── Litepie.php └── LitepieServiceProvider.php ├── resources └── views │ └── vendor │ └── litepie │ ├── partials │ ├── responsive_ads.blade.php │ ├── header.blade.php │ ├── footer.blade.php │ └── menu.blade.php │ ├── page │ └── index.blade.php │ ├── layouts │ └── app.blade.php │ ├── posts │ ├── view.blade.php │ └── index.blade.php │ └── home │ └── welcome.blade.php ├── public └── vendor │ ├── fonts │ └── vendor │ │ ├── pe7-icon │ │ └── dist │ │ │ ├── Pe-icon-7-stroke.eot │ │ │ ├── Pe-icon-7-stroke.ttf │ │ │ └── Pe-icon-7-stroke.woff │ │ ├── font-awesome │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ └── fontawesome-webfont.woff2 │ │ └── bootstrap-sass │ │ └── bootstrap │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ ├── glyphicons-halflings-regular.woff2 │ │ └── glyphicons-halflings-regular.svg │ └── litepie │ ├── css │ └── custom.css │ └── js │ └── tinymce.min.js ├── routes └── litepie.php ├── versioning.md ├── config └── litepie.php ├── license ├── composer.json ├── README.md └── database └── seeds └── LitepieSeeder.php /src/Console/stubs/make/routes.stub: -------------------------------------------------------------------------------- 1 | 2 | Litepie::routes(); 3 | -------------------------------------------------------------------------------- /resources/views/vendor/litepie/partials/responsive_ads.blade.php: -------------------------------------------------------------------------------- 1 | {!! setting('quick-adsense.random_ads') !!} -------------------------------------------------------------------------------- /public/vendor/fonts/vendor/pe7-icon/dist/Pe-icon-7-stroke.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kenhyuwa/laravel-voyager-blog/HEAD/public/vendor/fonts/vendor/pe7-icon/dist/Pe-icon-7-stroke.eot -------------------------------------------------------------------------------- /public/vendor/fonts/vendor/pe7-icon/dist/Pe-icon-7-stroke.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kenhyuwa/laravel-voyager-blog/HEAD/public/vendor/fonts/vendor/pe7-icon/dist/Pe-icon-7-stroke.ttf -------------------------------------------------------------------------------- /public/vendor/fonts/vendor/font-awesome/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kenhyuwa/laravel-voyager-blog/HEAD/public/vendor/fonts/vendor/font-awesome/fontawesome-webfont.eot -------------------------------------------------------------------------------- /public/vendor/fonts/vendor/font-awesome/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kenhyuwa/laravel-voyager-blog/HEAD/public/vendor/fonts/vendor/font-awesome/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /public/vendor/fonts/vendor/font-awesome/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kenhyuwa/laravel-voyager-blog/HEAD/public/vendor/fonts/vendor/font-awesome/fontawesome-webfont.woff -------------------------------------------------------------------------------- /public/vendor/fonts/vendor/pe7-icon/dist/Pe-icon-7-stroke.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kenhyuwa/laravel-voyager-blog/HEAD/public/vendor/fonts/vendor/pe7-icon/dist/Pe-icon-7-stroke.woff -------------------------------------------------------------------------------- /public/vendor/fonts/vendor/font-awesome/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kenhyuwa/laravel-voyager-blog/HEAD/public/vendor/fonts/vendor/font-awesome/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /public/vendor/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kenhyuwa/laravel-voyager-blog/HEAD/public/vendor/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /public/vendor/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kenhyuwa/laravel-voyager-blog/HEAD/public/vendor/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /public/vendor/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kenhyuwa/laravel-voyager-blog/HEAD/public/vendor/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /public/vendor/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kenhyuwa/laravel-voyager-blog/HEAD/public/vendor/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /src/Helpers/Litepie.php: -------------------------------------------------------------------------------- 1 | litepieSeed.$class.'.php'; 11 | } 12 | 13 | with(new $class())->run(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Facades/Litepie.php: -------------------------------------------------------------------------------- 1 | 'litepie', 5 | 'namespace' => config('litepie.controllers.namespace'), 6 | ], function(){ 7 | Route::get('/', 'LitepieController@index'); 8 | Route::get('category/{slug}', 'LitepieController@category'); 9 | Route::get('{any}', 'LitepieController@any'); 10 | Route::get('search/{q?}', 'LitepieController@searching'); 11 | }); -------------------------------------------------------------------------------- /resources/views/vendor/litepie/partials/header.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
6 |
7 | {{-- --}} 8 |
9 |
10 |
11 |
12 |
13 |
14 | -------------------------------------------------------------------------------- /public/vendor/litepie/css/custom.css: -------------------------------------------------------------------------------- 1 | @import url(https://fonts.googleapis.com/css?family=Titillium+Web:400,600,700); 2 | .voyager .panel.panel-warning .panel-heading { 3 | background-color: rgb(244, 100, 95) !important; 4 | } 5 | .voyager .panel.panel-primary .panel-heading { 6 | background-color: #009689 !important; 7 | } 8 | body, html{ 9 | font-family: 'Titillium Web', sans-serif; 10 | } 11 | input[type=checkbox]{ 12 | margin: 0 0 0 10px; 13 | } -------------------------------------------------------------------------------- /src/Http/Controllers/LitepieComposer.php: -------------------------------------------------------------------------------- 1 | allPage(); 15 | $data['menus'] = $this->menu(); 16 | $view->with('litepie', $data); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /versioning.md: -------------------------------------------------------------------------------- 1 | # Versioning for Voyager 2 | 3 | We try to follow [semver](http://semver.org/) versioning standards as best we can. 4 | 5 | This means that any changes to the current stable version of Voyager should be done targeting the `master` branch, which will be included in a new patch releases (e.g. 1.0.**1**). 6 | 7 | However, any pull requests containing breaking/backwards-incompatible changes **must** target the `develop` branch, which will be included in a new minor or major release (e.g. 1.**1**.0 or **2**.0.0) 8 | 9 | If you have questions about this, please join our Slack team. 10 | -------------------------------------------------------------------------------- /src/Litepie.php: -------------------------------------------------------------------------------- 1 | view, $name, []) as $event) { 16 | $event($name, $parameters); 17 | } 18 | return view($name, $parameters); 19 | } 20 | 21 | public function onLoadingView($name, \Closure $closure) 22 | { 23 | if (!isset($this->view[$name])) { 24 | $this->view[$name] = []; 25 | } 26 | 27 | $this->view[$name][] = $closure; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/Console/stubs/make/views/example.stub: -------------------------------------------------------------------------------- 1 | @extends('litepie::layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
New Page of Litepie Blog
9 | 10 |
11 | @if (session('status')) 12 |
13 | {{ session('status') }} 14 |
15 | @endif 16 | 17 | Litepie Installed Successfully 18 |
19 |
20 |
21 |
22 |
23 | @endsection 24 | -------------------------------------------------------------------------------- /config/litepie.php: -------------------------------------------------------------------------------- 1 | [ 10 | 'namespace' => 'Ken\\Blog\\Http\\Controllers', 11 | ], 12 | 'assets_path' => '/vendor/litepie', 13 | /** 14 | * Your Application Title 15 | */ 16 | 'name' => env('LITEPIE_NAME', 'litepie'), 17 | 18 | /** 19 | * Your Application Title 20 | */ 21 | 'app_name' => env('LITEPIE_APP_NAME', 'litepie'), 22 | 23 | /** 24 | * Your Application Description 25 | */ 26 | 'description' => env('LITEPIE_DESCRIPTION', 'Tutorial Laravel Indonesia'), 27 | 28 | /** 29 | * Local building the App 30 | */ 31 | 'building' => env('LITEPIE_BUILDING', 'Jogjakarta, Indonesia'), 32 | ]; -------------------------------------------------------------------------------- /license: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 Litepie.com 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ken/laravel-voyager-blog", 3 | "description": "Create a blog very easy with litepie Blog & laravel voyager", 4 | "type": "library", 5 | "keywords": ["laravel", "litepie", "voyager"], 6 | "license": "MIT", 7 | "homepage": "https://litepie.com", 8 | "support": { 9 | "issues": "https://github.com/ken/laravel-voyager-blog/issues", 10 | "source": "https://github.com/ken/laravel-voyager-blog" 11 | }, 12 | "authors": [ 13 | { 14 | "name": "ken", 15 | "email": "wahyu.dhiraashandy8@gmail.com" 16 | } 17 | ], 18 | "require": { 19 | "illuminate/support": "~5.4.0|~5.5.0", 20 | "tcg/voyager": "1.0.1", 21 | "ken/blade-minify": "^1.0" 22 | }, 23 | "autoload": { 24 | "psr-4": { 25 | "Ken\\Blog\\": "src" 26 | } 27 | }, 28 | "autoload-dev": { 29 | "psr-4": { 30 | "Ken\\Blog\\Tests\\": "tests/" 31 | } 32 | }, 33 | "minimum-stability": "stable", 34 | "extra": { 35 | "laravel": { 36 | "providers": [ 37 | "Ken\\Blog\\LitepieServiceProvider" 38 | ] 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/Http/Controllers/LitepieController.php: -------------------------------------------------------------------------------- 1 | page . 'home.welcome', $this->allPost()); 16 | } 17 | 18 | public function category(Request $request, $slug) 19 | { 20 | return view($this->page . 'posts.index', $this->allCategory($slug)); 21 | } 22 | 23 | public function any(Request $request) 24 | { 25 | if($request->path() == 'blog') 26 | return view($this->page . 'posts.index', $this->blog($request->path())); 27 | else if($request->path() == 'about-us') 28 | return view($this->page . 'page.index', $this->page($request->path())); 29 | else if($request->path() == 'disclaimer') 30 | return view($this->page . 'page.index', $this->page($request->path())); 31 | else if($request->path() == 'privacy-policy') 32 | return view($this->page . 'page.index', $this->page($request->path())); 33 | else 34 | return view($this->page . 'posts.view', $this->post($request->path())); 35 | } 36 | 37 | public function searching(Request $request, $q) 38 | { 39 | if($request->ajax()){ 40 | return response() 41 | ->json($this->search($q)); 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /resources/views/vendor/litepie/partials/footer.blade.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /resources/views/vendor/litepie/page/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('litepie::layouts.app') 2 | @section('title') 3 | {{ ucwords(str_slug($page->title , ' ')) }} 4 | @endsection 5 | @section('keywords') 6 | {{ ucwords($page->meta_keywords) }} 7 | @endsection 8 | @section('link') 9 | {{ URL($page->slug) }} 10 | @endsection 11 | @section('meta_desc') 12 | {{ ucwords($page->meta_description) }} 13 | @endsection 14 | @section('images') 15 | {{ !empty($page) ? asset('storage/' . $page->image) : asset('storage/pages/' . setting('site.site_background')) }} 16 | @endsection 17 | @section('content') 18 |
19 |

{{ ucwords(str_slug($slug , ' ')) }}

20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |

29 | {!! htmlspecialchars_decode($page->body) !!} 30 |

31 |
32 | @if(count(setting('quick-adsense.random_ads'))) 33 |
34 |
35 |
SPONSOR
36 | @include('litepie::partials.responsive_ads') 37 |
38 |
39 | @endif 40 |
41 |
42 |
43 |
44 |
45 |
46 | @endsection -------------------------------------------------------------------------------- /src/LitepieServiceProvider.php: -------------------------------------------------------------------------------- 1 | alias('Litepie', LitepieWeb::class); 16 | $this->app->bind('litepie', function() { 17 | return new Litepie(); 18 | }); 19 | $this->loadHelpers(); 20 | if ($this->app->runningInConsole()) { 21 | $this->publishLitepie(); 22 | $this->litepieInstall(); 23 | } 24 | } 25 | 26 | public function boot() 27 | { 28 | $this->loadViewsFrom(__DIR__ . '/../resources/views/vendor/litepie/', 'litepie'); 29 | 30 | $this->viewComposers(); 31 | } 32 | 33 | protected function publishLitepie() 34 | { 35 | $publish = [ 36 | 'litepie_assets' => [ 37 | __DIR__ . '/../public/vendor/litepie/' => public_path(config('litepie.assets_path')), 38 | ], 39 | 'assets' => [ 40 | __DIR__ . '/../public/vendor/fonts/' => public_path('fonts'), 41 | ], 42 | 'config' => [ 43 | __DIR__ . '/../config/litepie.php' => config_path('litepie.php'), 44 | ], 45 | 'seeds' => [ 46 | __DIR__ . '/../database/seeds' => database_path('seeds'), 47 | ], 48 | ]; 49 | 50 | foreach ($publish as $key => $value) { 51 | $this->publishes($value, $key); 52 | } 53 | } 54 | 55 | protected function viewComposers() 56 | { 57 | View::composer('litepie::*', 'Ken\Blog\Http\Controllers\LitepieComposer'); 58 | } 59 | 60 | private function litepieInstall() 61 | { 62 | $this->commands(Console\LitepieInstall::class); 63 | } 64 | 65 | protected function loadHelpers() 66 | { 67 | foreach (glob(__DIR__.'/Helpers/*.php') as $filename) { 68 | require_once $filename; 69 | } 70 | } 71 | 72 | } 73 | -------------------------------------------------------------------------------- /public/vendor/litepie/js/tinymce.min.js: -------------------------------------------------------------------------------- 1 | tinymce.init({ 2 | // setup: function (ed) { 3 | // ed.onSaveContent.add(function (ed, o) { 4 | // o.content = o.content.replace(/'/g, '&apos'); 5 | // }); 6 | // }, 7 | menubar: false, 8 | selector:'textarea.richTextBox', 9 | skin: 'voyager', 10 | min_height: 600, 11 | resize: 'vertical', 12 | plugins: 'autoresize link, template, image, code, youtube, giphy, table, textcolor, codesample, autosave, image imagetools, wordcount, pagebreak', 13 | extended_valid_elements : 'input[id|name|value|type|class|style|required|placeholder|autocomplete|onclick]', 14 | file_browser_callback: function(field_name, url, type, win) { 15 | if(type =='image'){ 16 | $('#upload_file').trigger('click'); 17 | } 18 | }, 19 | toolbar: 'formatselect bold italic forecolor aligncenter bullist numlist link image youtube giphy code codesample restoredraft pagebreak template emoticons', 20 | imagetools_toolbar: "rotateleft rotateright | flipv fliph | editimage imageoptions", 21 | convert_urls: false, 22 | image_caption: true, 23 | image_title: true, 24 | remove_linebreaks : false, 25 | encoding: 'xml', 26 | autoresize_bottom_margin: 50, 27 | block_formats: 'Paragraph=p;Header 1=h1;Header 2=h2;Header 3=h3;Header 4=h4;Header 5=h5;Header 6=h6;Pre=pre;code=code;blockquote=blockquote', 28 | element_format : 'html', 29 | extended_valid_elements : "textarea[cols|rows|disabled|name|readonly|class]", 30 | wordcount_countregex: /[\w\u2019\x27\-\u00C0-\u1FFF]+/g, 31 | autosave_ask_before_unload: true, 32 | autosave_interval: "20s", 33 | autosave_restore_when_empty: true, 34 | codesample_languages: [ 35 | {text: 'HTML/XML', value: 'markup'}, 36 | {text: 'JavaScript', value: 'javascript'}, 37 | {text: 'CSS', value: 'css'}, 38 | {text: 'PHP', value: 'php'}, 39 | {text: 'MySQL', value: 'SQL'}, 40 | {text: 'Git', value: 'Git'}, 41 | {text: 'Ruby', value: 'ruby'}, 42 | {text: 'Python', value: 'python'}, 43 | {text: 'Java', value: 'java'}, 44 | {text: 'C', value: 'c'}, 45 | {text: 'C#', value: 'csharp'}, 46 | {text: 'C++', value: 'cpp'}, 47 | ], 48 | bbcode_dialect: "punbb", 49 | templates: [ 50 | {title: 'Closing Text', description: 'Closing Text', content: 'My content'}, 51 | ] 52 | }); -------------------------------------------------------------------------------- /resources/views/vendor/litepie/partials/menu.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 |
5 | @foreach ($litepie['menus'] as $menu) 6 |
7 | {{ strtoupper(str_limit($menu->name, $limit = 1, $end = '')) }} 8 |
9 | @endforeach 10 | 15 | 20 |
21 | 22 |
23 | × 24 |
25 | 28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 | × 37 |
38 | 44 | 68 |
69 |
-------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 |

4 | Build Status 5 | Build Status 6 | Total Downloads 7 | Latest Stable Version 8 | License 9 | Awesome Voyager 10 |

11 | 12 | # **V**oyager - The Missing Laravel Admin 13 | Made with ❤️ by [The Control Group](https://www.thecontrolgroup.com) 14 | 15 | ![Voyager Screenshot](https://s3.amazonaws.com/thecontrolgroup/voyager-screenshot.png) 16 | 17 | Website & Documentation: https://laravelvoyager.com 18 | 19 | Video Tutorial Here: https://laravelvoyager.com/academy/ 20 | 21 | Join our Slack chat: https://voyager-slack-invitation.herokuapp.com/ 22 | 23 | View the Voyager Cheat Sheet: https://voyager-cheatsheet.ulties.com/ 24 | 25 |
26 | 27 | 28 |

29 | 30 |

31 | Laravel Admin & BREAD System (Browse, Read, Edit, Add, & Delete) & Blog, supporting Laravel 5.4 and newer! 32 | Build with Voyager Admin Package & ready update if voyager update 33 | 34 | ## Installation Steps 35 | 36 | ### 1. Require the Package 37 | 38 | After creating your new Laravel application you can include the Voyager package with the following command: 39 | 40 | ```bash 41 | composer require ken/laravel-voyager-blog 42 | ``` 43 | 44 | ### 2. Add the DB Credentials & APP_URL 45 | 46 | Next make sure to create a new database and add your database credentials to your .env file: 47 | 48 | ``` 49 | DB_HOST=localhost 50 | DB_DATABASE=homestead 51 | DB_USERNAME=homestead 52 | DB_PASSWORD=secret 53 | 54 | LITEPIE_PREFIX=your/dashboard 55 | LITEPIE_NAME=litepie 56 | LITEPIE_APP_NAME=litepie 57 | LITEPIE_DESCRIPTION="Description Your App" 58 | LITEPIE_BUILDING="Jakarta, Indonesia" 59 | ``` 60 | 61 | You will also want to update your website URL inside of the `APP_URL` variable inside the .env file: 62 | 63 | ``` 64 | APP_URL=http://localhost:8000 65 | ``` 66 | 67 | > Only if you are on Laravel 5.4 will you need to [Add the Service Provider.](https://voyager.readme.io/docs/adding-the-service-provider) 68 | 69 | and adding 70 | ``` 71 | Ken\Blog\LitepieServiceProvider::class, 72 | ``` 73 | 74 | ### 3. Automaticly Install Voyager 75 | ``` 76 | php artisan litepieweb:install 77 | ``` 78 | open config/voyager.php and change like this 79 | ``` 80 | 'additional_css' => [ 81 | 'vendor/litepie/css/custom.css', 82 | ], 83 | 84 | 'additional_js' => [ 85 | 'vendor/litepie/js/tinymce.min.js', 86 | ], 87 | ``` 88 | > Troubleshooting: **Specified key was too long error**. If you see this error message you have an outdated version of MySQL, use the following solution: https://laravel-news.com/laravel-5-4-key-too-long-error 89 | 90 | And we're all good to go! 91 | 92 | Start up a local development server with `php artisan serve` And, visit [http://localhost:8000/your/dashboard](http://localhost:8000/your/dashboard) for akses admin page 93 | 94 | Thanks to the control group -------------------------------------------------------------------------------- /resources/views/vendor/litepie/layouts/app.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | @yield('title') 6 | 7 | 8 | 9 | 10 | 11 | 12 | 14 | 15 | 16 | 17 | {!! (count(setting('general.google_site_verification'))) ? setting('general.google_site_verification') : '' !!} 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 46 | {!! (count(setting('site.google_analytics_tracking_id'))) ? setting('site.google_analytics_tracking_id') : '' !!} 47 | 48 | 49 | {!! (count(setting('general.facebook_sdk'))) ? setting('general.facebook_sdk') : '' !!} 50 |
51 |
52 | 53 | @if (empty(setting('site.logo'))) 54 | litepie 55 | @else 56 | 57 | @endif 58 | 59 |
60 | @include('litepie::partials.menu') 61 | 66 | @yield('content') 67 | @yield('footer_ads') 68 | @include('litepie::partials.footer') 69 |
70 | 71 |
72 |
73 | 74 | 79 | @stack('script') 80 | 81 | 82 | -------------------------------------------------------------------------------- /src/Console/LitepieInstall.php: -------------------------------------------------------------------------------- 1 | 'example.blade.php', 38 | ]; 39 | 40 | /** 41 | * Execute the console command. 42 | * 43 | * @return void 44 | */ 45 | protected function findComposer() 46 | { 47 | if (file_exists(getcwd().'/composer.phar')) { 48 | return '"'.PHP_BINARY.'" '.getcwd().'/composer.phar'; 49 | } 50 | 51 | return 'composer'; 52 | } 53 | 54 | public function fire(Filesystem $filesystem) 55 | { 56 | $this->handle($filesystem); 57 | } 58 | 59 | public function handle(Filesystem $filesystem) 60 | { 61 | $this->info('Installation Voyager Packages Admin'); 62 | $this->call('voyager:install'); 63 | 64 | $this->info('Publishing example page to views'); 65 | $this->exportExample(); 66 | 67 | $this->info('Publishing the assets, and config files'); 68 | $this->call('vendor:publish', ['--provider' => LitepieServiceProvider::class]); 69 | 70 | $this->info('Replace namespace from RouteServiceProvider'); 71 | if (file_exists(app_path('Providers/RouteServiceProvider.php'))) { 72 | $files = file_get_contents(app_path('Providers/RouteServiceProvider.php')); 73 | if ($files !== false) { 74 | $files = str_replace( 75 | 'App\Http\Controllers', 76 | "", 77 | $files 78 | ); 79 | file_put_contents( 80 | app_path('Providers/RouteServiceProvider.php'), 81 | $files 82 | ); 83 | } 84 | } else { 85 | $this->warn('Unable to locate "app/Providers/RouteServiceProvider.php". Did you move this file?'); 86 | $this->warn('You need to update this manually. Change $protected = "App\Http\Controllers" to $protected = "" in app/Providers/RouteServiceProvider.php'); 87 | } 88 | 89 | $composer = $this->findComposer(); 90 | 91 | $process = new Process($composer.' dump-autoload'); 92 | $process->setWorkingDirectory(base_path())->run(); 93 | 94 | $this->info('Replace Route in routes/web.php'); 95 | $routes_contents = $filesystem->get(base_path('routes/web.php')); 96 | if(false === strpos($routes_contents, 'Litepie::routes()')){ 97 | $filesystem->append( 98 | base_path('routes/web.php'), 99 | "Litepie::routes();" 100 | ); 101 | } 102 | if (file_exists(base_path('routes/web.php'))) { 103 | $prefixAdmin = file_get_contents(base_path('routes/web.php')); 104 | if ($prefixAdmin !== false) { 105 | $prefixAdmin = str_replace( 106 | "admin", 107 | (setting('admin.admin_prefix')) ? setting('admin.admin_prefix') : config('voyager.prefix'), 108 | $prefixAdmin 109 | ); 110 | file_put_contents( 111 | base_path('routes/web.php'), 112 | $prefixAdmin 113 | ); 114 | } 115 | } else { 116 | $this->warn('Unable to locate "routes/web.php". Did you move this file?'); 117 | $this->warn('You need to update this manually. Change ["prefix" => "admin"] to ["prefix" => "your/prefix-admin"] in routes/web.php'); 118 | } 119 | 120 | $this->info('Replace config from Voyager'); 121 | $config = file_get_contents(base_path('config/voyager.php')); 122 | if($config != false){ 123 | $config = str_replace( 124 | "'prefix' => 'admin',", 125 | "'prefix' => env('LITEPIE_PREFIX'),", 126 | $config 127 | ); 128 | file_put_contents( 129 | base_path('config/voyager.php'), 130 | $config 131 | ); 132 | } 133 | 134 | $this->info('Seeding data into the database'); 135 | $this->seed('VoyagerDummyDatabaseSeeder'); 136 | $this->litepieSeed('LitepieSeeder'); 137 | 138 | $this->info('Litepie Blog Installed successfully and Enjoy!.'); 139 | 140 | } 141 | 142 | /** 143 | * Export the authentication views. 144 | * 145 | * @return void 146 | */ 147 | protected function exportExample() 148 | { 149 | foreach ($this->views as $key => $value) { 150 | if (file_exists($view = resource_path('views/'.$value))) { 151 | if (! $this->confirm("The [{$value}] view already exists. Do you want to replace it?")) { 152 | continue; 153 | } 154 | } 155 | 156 | copy( 157 | __DIR__.'/stubs/make/views/'.$key, 158 | $view 159 | ); 160 | } 161 | } 162 | } 163 | -------------------------------------------------------------------------------- /src/Http/Controllers/Controller.php: -------------------------------------------------------------------------------- 1 | postWithLimit('Laravel', 3); 24 | $data['packages'] = $this->postWithLimit('Packages', 2); 25 | $data['new_post'] = $this->newPost(2); 26 | $data['blogs'] = $this->postWithLimitAndNotIn(['Laravel', 'Packages'], [$data['new_post']->first()->id, $data['new_post']->last()->id], 3); 27 | if(sizeof($data['laravels']) >= 6) 28 | $data['laravels'] = $data['laravels']->limit(6)->get(); 29 | if(sizeof($data['packages']) >= 4) 30 | $data['packages'] = $data['packages']->limit(4)->get(); 31 | if(sizeof($data['blogs']) < 3) 32 | $data['blogs'] = ''; 33 | return $data; 34 | } 35 | 36 | protected function newPost($limit) 37 | { 38 | return Post::where( 39 | [ 40 | 'status' => $this->is_publish, 41 | ] 42 | )->orderby('created_at', 'DESC') 43 | ->limit($limit) 44 | ->get(); 45 | } 46 | 47 | protected function postWithLimit($category, $limit) 48 | { 49 | return Post::whereHas('category', function($categorys) use ($category){ 50 | $categorys->whereName($category); 51 | })->where( 52 | [ 53 | 'status' => $this->is_publish, 54 | ] 55 | )->orderby('created_at', 'DESC') 56 | ->limit($limit) 57 | ->get(); 58 | } 59 | 60 | protected function postWithLimitAndNotIn($array_category, $array_id, $limit) 61 | { 62 | return Post::whereHas('category', function($category) use ($array_category){ 63 | $category->whereNotIn('name', $array_category); 64 | $category->where('name', 'Blog'); 65 | })->where( 66 | [ 67 | 'status' => $this->is_publish, 68 | ] 69 | )->orderby('created_at', 'DESC') 70 | ->whereNotIn('id', $array_id) 71 | ->limit($limit) 72 | ->get(); 73 | } 74 | 75 | protected function allCategory($slug) 76 | { 77 | $category = Category::whereSlug($slug)->first(); 78 | if($category){ 79 | $data['category'] = Post::where( 80 | [ 81 | 'category_id' => $category->id, 82 | 'status' => $this->is_publish, 83 | ] 84 | ) 85 | ->orderby('created_at', 'DESC') 86 | ->paginate(8); 87 | $data['slug'] = $slug; 88 | return $data; 89 | }else{ 90 | return abort(404); 91 | } 92 | } 93 | 94 | protected function post($slug) 95 | { 96 | $post = Post::where( 97 | [ 98 | 'slug' => $slug, 99 | 'status' => $this->is_publish, 100 | ] 101 | )->first(); 102 | if($post){ 103 | $data['post'] = $post; 104 | $data['recent'] = $this->randomPost($post->id, 3); 105 | $data['prev_next'] = $this->prevNext($post->id, $post->category_id); 106 | return $data; 107 | }else{ 108 | return abort(404); 109 | } 110 | } 111 | 112 | protected function randomPost($id, $count) 113 | { 114 | $random = Post::where('id', '!=', $id)->where( 115 | [ 116 | 'status' => $this->is_publish, 117 | ] 118 | )->get(); 119 | if($random->count() < $count) 120 | $count = $random->count(); 121 | return collect($random)->random($count); 122 | } 123 | 124 | protected function prevNext($id, $category) 125 | { 126 | $data['uriPrev'] = ''; 127 | $data['uriNext'] = ''; 128 | $previous = Post::where('id', '<', $id) 129 | ->where( 130 | [ 131 | 'status' => $this->is_publish, 132 | 'category_id' => $category, 133 | ] 134 | ) 135 | ->orderBy('id', 'DESC') 136 | ->limit(1) 137 | ->first(); 138 | if($previous) 139 | $data['uriPrev'] = $previous; 140 | $next = Post::where('id', '>', $id) 141 | ->where( 142 | [ 143 | 'status' => $this->is_publish, 144 | 'category_id' => $category, 145 | ] 146 | ) 147 | ->orderBy('id', 'ASC') 148 | ->limit(1) 149 | ->first(); 150 | if($next) 151 | $data['uriNext'] = $next; 152 | return $data; 153 | } 154 | 155 | protected function allPage() 156 | { 157 | return Page::where( 158 | [ 159 | 'status' => $this->is_active, 160 | ] 161 | )->orderby('title', 'ASC') 162 | ->get(); 163 | } 164 | 165 | protected function page($slug) 166 | { 167 | $page = Page::where( 168 | [ 169 | 'status' => $this->is_active, 170 | 'slug' => $slug, 171 | ] 172 | )->first(); 173 | if($page){ 174 | $data['slug'] = $slug; 175 | $data['page'] = $page; 176 | return $data; 177 | }else{ 178 | return abort(404); 179 | } 180 | } 181 | 182 | protected function blog($slug) 183 | { 184 | $blog = Post::whereHas('category', function($blog) use ($slug){ 185 | $blog->where( 186 | [ 187 | 'slug' => $slug, 188 | ] 189 | ); 190 | }) 191 | ->where( 192 | [ 193 | 'status' => $this->is_publish, 194 | ] 195 | )->orderby('created_at', 'DESC') 196 | ->get(); 197 | if($blog){ 198 | $data['slug'] = $slug; 199 | $data['category'] = $blog; 200 | return $data; 201 | }else{ 202 | return abort(404); 203 | } 204 | } 205 | 206 | protected function search($query) 207 | { 208 | $result = ''; 209 | $post = Post::with('category') 210 | ->where('title', 'LIKE', "%{$query}%") 211 | ->where( 212 | [ 213 | 'status' => $this->is_publish, 214 | ] 215 | )->skip(0) 216 | ->take(10) 217 | ->get(); 218 | if($post) 219 | $result = $post; 220 | return $result; 221 | } 222 | 223 | protected function menu() 224 | { 225 | return Category::limit(4) 226 | ->orderby('name', 'ASC') 227 | ->get(); 228 | } 229 | } -------------------------------------------------------------------------------- /resources/views/vendor/litepie/posts/view.blade.php: -------------------------------------------------------------------------------- 1 | @extends('litepie::layouts.app') 2 | @section('title') 3 | {{ ucwords(str_slug($post->title , ' ')) }} 4 | @endsection 5 | @section('keywords') 6 | {{ ucwords($post->meta_keywords) }} 7 | @endsection 8 | @section('link') 9 | {{ URL($post->slug) }} 10 | @endsection 11 | @section('meta_desc') 12 | {{ ucwords($post->meta_description) }} 13 | @endsection 14 | @section('images') 15 | {{ !empty($post->image) ? asset('storage/' . $post->thumbnail('medium')) : asset('storage/pages/' . setting('site.site_background')) }} 16 | @endsection 17 | @section('content') 18 | @include('litepie::partials.header') 19 | @if (count(setting('quick-adsense.header_ads'))) 20 |
21 |
22 |
23 |
24 | 25 |
26 |
27 | {!! setting('quick-adsense.header_ads') !!} 28 |
29 |
30 | 31 |
32 |
33 |
34 |
35 | @endif 36 |
37 |
38 |
39 |
40 |
41 |
42 | {{ ucwords($post->title) }} 43 |
44 |
45 |
46 |
47 |

{{ ucwords($post->title) }}

48 | 49 | {{ (empty($post->category)) ? 'Category' : ucwords($post->category->name) }} 50 | {{ \Carbon\Carbon::parse($post->created_at)->format('d M Y') }} 51 | 52 |
53 |

54 | {!! htmlspecialchars_decode($post->body) !!} 55 |

56 | @if (!empty($prev_next['uriPrev'])) 57 |
58 | Baca Juga: {{ ucwords($prev_next['uriPrev']->title) }} 59 |
60 | @endif 61 |

62 | @if(count(setting('quick-adsense.article_ads'))) 63 |

64 | {!! setting('quick-adsense.article_ads') !!} 65 |

66 | @endif 67 |

68 | Terima kasih telah meluangkan waktu membaca artikel-artikel dari {{ setting('site.title') }}, Semoga bermanfaat. 69 |

70 |

71 |
72 | @if(count(setting('quick-adsense.random_ads'))) 73 |
74 |
75 |
SPONSOR
76 | @include('litepie::partials.responsive_ads') 77 |
78 |
79 | @endif 80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 | 97 |
98 |
99 |

SHARE

100 | 107 |
108 |
109 | 117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |

anything idea?

125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 | @if(count(setting('general.discus'))) 134 |
135 | 147 | 148 | @endif 149 |
150 |
151 |
152 |
153 | @if(sizeof($recent) > 0) 154 |
155 |
156 |
157 |
158 |

do you want a {{ (empty($post->category)) ? '' : ucwords(str_slug($post->category->slug , ' ')) }}?

159 | View all {{ (empty($post->category)) ? '' : ucwords(str_slug($post->category->slug , ' ')) }} 160 |
161 |
162 |
163 |
164 |
165 |
166 |
other article:
167 | 185 |
186 |
187 | @endif 188 | @endsection 189 | @section('footer_ads') 190 | @if(count(setting('quick-adsense.footer_ads'))) 191 |
192 |
193 |
194 |
195 |
196 |
197 | 200 |
201 |
202 |
203 |
204 |
205 |
206 | @endif 207 | @endsection 208 | @push('script') 209 | @if (count(setting('general.discus'))) 210 | 211 | @endif 212 | @endpush -------------------------------------------------------------------------------- /resources/views/vendor/litepie/home/welcome.blade.php: -------------------------------------------------------------------------------- 1 | @extends('litepie::layouts.app') 2 | @section('title') 3 | {{ (count(setting('site.title')) || count(setting('site.description'))) ? ucwords(setting('site.title') . ' - ' . setting('site.description')) : config('litepie.name') . ' - ' . config('litepie.description') }} 4 | @endsection 5 | @section('keywords') 6 | {{ (count(setting('site.keywords'))) ? setting('site.title') : config('litepie.name') }} 7 | @endsection 8 | @section('link') 9 | {{ URL('/') }} 10 | @endsection 11 | @section('meta_desc') 12 | {{ (count(setting('site.seo_description'))) ? ucwords(setting('site.seo_description')) : ucwords(config('litepie.description')) }} 13 | @endsection 14 | @section('images') 15 | {{ asset('storage/' . setting('site.logo')) }} 16 | @endsection 17 | @section('content') 18 | @include('litepie::partials.header') 19 | 20 |
21 |
22 |
23 | 38 |
39 |
40 |
41 |
42 |
43 | 44 |

{{ (count(setting('site.title'))) ? setting('site.title') : config('litepie.name') }}

45 |

{{ (count(setting('site.description'))) ? setting('site.description') : config('litepie.description') }}

46 | {!! (count(setting('general.social_media'))) ? setting('general.social_media') : '' !!} 47 |
48 |
49 |
50 | 65 |
66 |
67 |
68 | @if($blogs) 69 | 88 | @endif 89 |
90 |
91 |
92 |
93 |
94 |
95 |

{{ (count(setting('site.title'))) ? ucwords(setting('site.title')) : config('litepie.name') }} Tutorial

96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |

FACEBOOK US:

108 |
109 |
110 |
111 | @if(!empty(setting('general.facebook_fans_page'))) 112 |
113 |
114 | @endif 115 |
116 |
117 |
118 |
119 |
120 |
121 | {!! setting('quick-adsense.header_ads') !!} 122 |
123 |
124 |
125 |
126 |
127 |
128 | @if($packages->first()) 129 | 130 |
131 |
132 |
133 |
134 |

{{ str_slug($packages->first()->category->slug, ' ') }}

135 | View all {{ ucwords(str_slug($packages->first()->category->slug, ' ')) }} 136 |
137 |
138 |
139 |
140 |
141 |
142 | @foreach ($packages->chunk(2) as $chunk) 143 |
144 |
145 | @foreach ($chunk->chunk(2) as $chunk_again) 146 | @foreach ($chunk_again as $key => $package) 147 |
148 |
149 | {{ ucwords($package->title) }} 150 |
151 |
152 |
153 |
154 | Packages for {{ config('app.name', 'Laravel') }} 155 |

{{ ucwords($package->title) }}

156 | {{ ucwords($package->category->name) }} 157 |
158 |
159 | @if ($key == 0 || $key == 2) 160 |
161 | @endif 162 | @endforeach 163 | @endforeach 164 |
165 |
166 | @endforeach 167 |
168 |
169 | @endif 170 | 171 | @if($laravels->first()) 172 |
173 |
174 |
175 |
176 |

{{ str_slug($laravels->first()->category->slug, ' ') }}

177 | View all {{ ucwords(str_slug($laravels->first()->category->slug, ' ')) }} 178 |
179 |
180 |
181 |
182 |
183 |
184 | @foreach ($laravels->chunk(3) as $chunk) 185 | 210 | @endforeach 211 |
212 |
213 | @endif 214 | @endsection 215 | @section('footer_ads') 216 | @if(count(setting('quick-adsense.footer_ads'))) 217 |
218 |
219 |
220 |
221 |
222 |
223 | 226 |
227 |
228 |
229 |
230 |
231 |
232 | @endif 233 | @endsection -------------------------------------------------------------------------------- /resources/views/vendor/litepie/posts/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('litepie::layouts.app') 2 | @section('title') 3 | {{ ucwords(str_slug($slug , ' ')) }} 4 | @endsection 5 | @section('keywords') 6 | {{ ucwords(str_slug($slug , ' ')) }} 7 | @endsection 8 | @section('link') 9 | {{ URL('category/' . $slug) }} 10 | @endsection 11 | @section('meta_desc') 12 | {{ (count(setting('site.seo_description'))) ? ucwords(setting('site.seo_description')) : ucwords(config('litepie.description')) }} 13 | @endsection 14 | @section('images') 15 | {{ !empty($post->image) ? asset('storage/' . $post->image) : asset('storage/pages/' . setting('site.site_background')) }} 16 | @endsection 17 | @section('content') 18 | @if($slug === str_slug('blog', '-')) 19 |
20 |

{{ ucwords(str_slug($slug , ' ')) }}

21 |
22 |
23 |
24 |
25 |
26 |

{{ str_slug($slug , ' ') }}

27 | View all {{ ucwords(str_slug($slug , ' ')) }} 28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 | @foreach ($category as $key => $post) 36 | 56 | @endforeach 57 | @if(count(setting('quick-adsense.random_ads'))) 58 |
59 |
60 |
61 | @include('litepie::partials.responsive_ads') 62 |
63 |
64 |
sponsor
65 |
66 | @endif 67 |
68 |
69 |
70 | @elseif ($slug === str_slug('Tutorial Laravel Indonesia', '-')) 71 |
72 |

{{ ucwords(str_slug($slug , ' ')) }}

73 |
74 |
75 |
76 |
77 |
78 |

{{ str_slug($slug , ' ') }}

79 | View all {{ ucwords(str_slug($slug , ' ')) }} 80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 | @foreach ($category as $key => $post) 88 | 108 | @endforeach 109 | @if(count(setting('quick-adsense.random_ads'))) 110 |
111 |
112 |
113 | @include('litepie::partials.responsive_ads') 114 |
115 |
116 |
sponsor
117 |
118 | @endif 119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 | {!! $category->links() !!} 127 |
128 |
129 |
130 |
131 | @elseif($slug === str_slug('Packages Development', '-')) 132 |
133 |

{{ ucwords(str_slug($slug , ' ')) }}

134 |
135 |
136 |
137 |
138 |
139 |

{{ str_slug($slug , ' ') }}

140 | View all {{ ucwords(str_slug($slug , ' ')) }} 141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 | @foreach ($category as $key => $post) 149 | 169 | @endforeach 170 | @if(count(setting('quick-adsense.random_ads'))) 171 |
172 |
173 |
174 | @include('litepie::partials.responsive_ads') 175 |
176 |
177 |
sponsor
178 |
179 | @endif 180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 | {!! $category->links() !!} 188 |
189 |
190 |
191 |
192 | @elseif($slug === str_slug('php', '-')) 193 |
194 |

Tutorial {{ strtoupper(str_slug($slug , ' ')) }}

195 |
196 |
197 |
198 |
199 |
200 |

Tutorial {{ strtoupper(str_slug($slug , ' ')) }}

201 | View all Tutorial {{ strtoupper(str_slug($slug , ' ')) }} 202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 | @foreach ($category as $key => $post) 210 | 229 | @endforeach 230 | @if(count(setting('quick-adsense.random_ads'))) 231 |
232 |
233 |
234 |
235 | @include('litepie::partials.responsive_ads') 236 |
237 |
238 |
sponsor
239 |
240 |
241 | @endif 242 |
243 |
244 |
245 |
246 |
247 |
248 |
249 | {!! $category->links() !!} 250 |
251 |
252 |
253 |
254 | @elseif($slug === str_slug('Web Development', '-')) 255 |
256 |

{{ ucwords(str_slug($slug , ' ')) }}

257 |
258 |
259 |
260 |
261 |
262 |

{{ ucwords(str_slug($slug , ' ')) }}

263 | View all {{ ucwords(str_slug($slug , ' ')) }} 264 |
265 |
266 |
267 |
268 |
269 |
270 |
271 | @foreach ($category as $key => $post) 272 | 291 | @endforeach 292 | @if(count(setting('quick-adsense.random_ads'))) 293 |
294 |
295 |
296 |
297 | @include('litepie::partials.responsive_ads') 298 |
299 |
300 |
sponsor
301 |
302 |
303 | @endif 304 |
305 |
306 |
307 |
308 |
309 |
310 |
311 | {!! $category->links() !!} 312 |
313 |
314 |
315 |
316 | @endif 317 | @endsection 318 | -------------------------------------------------------------------------------- /database/seeds/LitepieSeeder.php: -------------------------------------------------------------------------------- 1 | findSetting('site.title'); 16 | if (!$setting->exists) { 17 | $setting->fill([ 18 | 'display_name' => 'Site Title', 19 | 'value' => 'Site Title', 20 | 'details' => '', 21 | 'type' => 'text', 22 | 'order' => 1, 23 | 'group' => 'Site', 24 | ])->save(); 25 | } 26 | 27 | $setting = $this->findSetting('site.description'); 28 | if (!$setting->exists) { 29 | $setting->fill([ 30 | 'display_name' => 'Site Description', 31 | 'value' => 'Site Description', 32 | 'details' => '', 33 | 'type' => 'text', 34 | 'order' => 2, 35 | 'group' => 'Site', 36 | ])->save(); 37 | } 38 | 39 | $setting = $this->findSetting('site.logo'); 40 | if (!$setting->exists) { 41 | $setting->fill([ 42 | 'display_name' => 'Site Logo', 43 | 'value' => '', 44 | 'details' => '', 45 | 'type' => 'image', 46 | 'order' => 3, 47 | 'group' => 'Site', 48 | ])->save(); 49 | } 50 | 51 | $setting = $this->findSetting('site.google_analytics_tracking_id'); 52 | if (!$setting->exists) { 53 | $setting->fill([ 54 | 'display_name' => 'Google Analytics Tracking ID', 55 | 'value' => '', 56 | 'details' => '', 57 | 'type' => 'text', 58 | 'order' => 4, 59 | 'group' => 'Site', 60 | ])->save(); 61 | } 62 | 63 | $setting = $this->findSetting('admin.bg_image'); 64 | if (!$setting->exists) { 65 | $setting->fill([ 66 | 'display_name' => 'Admin Background Image', 67 | 'value' => '', 68 | 'details' => '', 69 | 'type' => 'image', 70 | 'order' => 5, 71 | 'group' => 'Admin', 72 | ])->save(); 73 | } 74 | 75 | $setting = $this->findSetting('admin.title'); 76 | if (!$setting->exists) { 77 | $setting->fill([ 78 | 'display_name' => 'Admin Title', 79 | 'value' => 'Voyager', 80 | 'details' => '', 81 | 'type' => 'text', 82 | 'order' => 1, 83 | 'group' => 'Admin', 84 | ])->save(); 85 | } 86 | 87 | $setting = $this->findSetting('admin.description'); 88 | if (!$setting->exists) { 89 | $setting->fill([ 90 | 'display_name' => 'Admin Description', 91 | 'value' => 'Welcome to Voyager. The Missing Admin for Laravel', 92 | 'details' => '', 93 | 'type' => 'text', 94 | 'order' => 2, 95 | 'group' => 'Admin', 96 | ])->save(); 97 | } 98 | 99 | $setting = $this->findSetting('admin.loader'); 100 | if (!$setting->exists) { 101 | $setting->fill([ 102 | 'display_name' => 'Admin Loader', 103 | 'value' => '', 104 | 'details' => '', 105 | 'type' => 'image', 106 | 'order' => 3, 107 | 'group' => 'Admin', 108 | ])->save(); 109 | } 110 | 111 | $setting = $this->findSetting('admin.icon_image'); 112 | if (!$setting->exists) { 113 | $setting->fill([ 114 | 'display_name' => 'Admin Icon Image', 115 | 'value' => '', 116 | 'details' => '', 117 | 'type' => 'image', 118 | 'order' => 4, 119 | 'group' => 'Admin', 120 | ])->save(); 121 | } 122 | 123 | $setting = $this->findSetting('admin.google_analytics_client_id'); 124 | if (!$setting->exists) { 125 | $setting->fill([ 126 | 'display_name' => 'Google Analytics Client ID (used for admin dashboard)', 127 | 'value' => '', 128 | 'details' => '', 129 | 'type' => 'text', 130 | 'order' => 1, 131 | 'group' => 'Admin', 132 | ])->save(); 133 | } 134 | 135 | $setting = $this->findSetting('site.building'); 136 | if (!$setting->exists) { 137 | $setting->fill([ 138 | 'display_name' => 'Side Building', 139 | 'value' => 'Jogjakarta, Indonesia', 140 | 'details' => '', 141 | 'type' => 'text', 142 | 'order' => 4, 143 | 'group' => 'Site', 144 | ])->save(); 145 | } 146 | 147 | $setting = $this->findSetting('site.app_name'); 148 | if (!$setting->exists) { 149 | $setting->fill([ 150 | 'display_name' => 'Site App Name', 151 | 'value' => 'litepie', 152 | 'details' => '', 153 | 'type' => 'text', 154 | 'order' => 2, 155 | 'group' => 'Site', 156 | ])->save(); 157 | } 158 | 159 | $setting = $this->findSetting('general.google_site_verification'); 160 | if (!$setting->exists) { 161 | $setting->fill([ 162 | 'display_name' => 'Google Site Verification', 163 | 'value' => '', 164 | 'details' => '', 165 | 'type' => 'code_editor', 166 | 'order' => 8, 167 | 'group' => 'General', 168 | ])->save(); 169 | } 170 | 171 | $setting = $this->findSetting('general.facebook_sdk'); 172 | if (!$setting->exists) { 173 | $setting->fill([ 174 | 'display_name' => 'Facebook SDK', 175 | 'value' => '', 176 | 'details' => '', 177 | 'type' => 'code_editor', 178 | 'order' => 9, 179 | 'group' => 'General', 180 | ])->save(); 181 | } 182 | 183 | $setting = $this->findSetting('general.facebook_fans_page'); 184 | if (!$setting->exists) { 185 | $setting->fill([ 186 | 'display_name' => 'Facebook Fans Page', 187 | 'value' => 'https://www.facebook.com/litepieweb', 188 | 'details' => '', 189 | 'type' => 'text', 190 | 'order' => 10, 191 | 'group' => 'General', 192 | ])->save(); 193 | } 194 | 195 | $setting = $this->findSetting('general.social_media'); 196 | if (!$setting->exists) { 197 | $setting->fill([ 198 | 'display_name' => 'Social Media', 199 | 'value' => '', 210 | 'details' => '', 211 | 'type' => 'code_editor', 212 | 'order' => 11, 213 | 'group' => 'General', 214 | ])->save(); 215 | } 216 | 217 | $setting = $this->findSetting('general.disqus'); 218 | if (!$setting->exists) { 219 | $setting->fill([ 220 | 'display_name' => 'Disqus', 221 | 'value' => 'https://your.disqus.com', 222 | 'details' => '', 223 | 'type' => 'text', 224 | 'order' => 12, 225 | 'group' => 'General', 226 | ])->save(); 227 | } 228 | 229 | $setting = $this->findSetting('quick-adsense.footer_ads'); 230 | if (!$setting->exists) { 231 | $setting->fill([ 232 | 'display_name' => 'Footer Ads', 233 | 'value' => '', 234 | 'details' => '', 235 | 'type' => 'code_editor', 236 | 'order' => 18, 237 | 'group' => 'Quick Adsense', 238 | ])->save(); 239 | } 240 | 241 | $setting = $this->findSetting('quick-adsense.header_ads'); 242 | if (!$setting->exists) { 243 | $setting->fill([ 244 | 'display_name' => 'Header Ads', 245 | 'value' => '', 246 | 'details' => '', 247 | 'type' => 'code_editor', 248 | 'order' => 13, 249 | 'group' => 'Quick Adsense', 250 | ])->save(); 251 | } 252 | 253 | $setting = $this->findSetting('quick-adsense.random_ads'); 254 | if (!$setting->exists) { 255 | $setting->fill([ 256 | 'display_name' => 'Random Ads', 257 | 'value' => '', 258 | 'details' => '', 259 | 'type' => 'code_editor', 260 | 'order' => 15, 261 | 'group' => 'Quick Adsense', 262 | ])->save(); 263 | } 264 | 265 | $setting = $this->findSetting('admin.admin_prefix'); 266 | if (!$setting->exists) { 267 | $setting->fill([ 268 | 'display_name' => 'Admin Prefix', 269 | 'value' => 'your/dashboard', 270 | 'details' => '', 271 | 'type' => 'text', 272 | 'order' => 16, 273 | 'group' => 'Admin', 274 | ])->save(); 275 | } 276 | 277 | $setting = $this->findSetting('site.site_background'); 278 | if (!$setting->exists) { 279 | $setting->fill([ 280 | 'display_name' => 'Site Background', 281 | 'value' => 'images/notebook.jpg', 282 | 'details' => '', 283 | 'type' => 'text', 284 | 'order' => 7, 285 | 'group' => 'site', 286 | ])->save(); 287 | } 288 | 289 | $setting = $this->findSetting('quick-adsense.article_ads'); 290 | if (!$setting->exists) { 291 | $setting->fill([ 292 | 'display_name' => 'Article Ads', 293 | 'value' => '', 294 | 'details' => '', 295 | 'type' => 'code_editor', 296 | 'order' => 14, 297 | 'group' => 'Quick Adsense', 298 | ])->save(); 299 | } 300 | } 301 | 302 | /** 303 | * [setting description]. 304 | * 305 | * @param [type] $key [description] 306 | * 307 | * @return [type] [description] 308 | */ 309 | protected function findSetting($key) 310 | { 311 | return Setting::firstOrNew(['key' => $key]); 312 | } 313 | } 314 | -------------------------------------------------------------------------------- /public/vendor/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | --------------------------------------------------------------------------------