/** * Available settings : * - website_title * - website_description * - admin_title * - admin_email * - code_header * - code_footer */ function get_global_settings($key) { static $settings; if (is_null($settings)) { //cache settings for one day $settings = Cache::remember('settings', 24 * 60, function () { return App\Setting::find(1)->data; }); } return $settings[$key]; }
@section('title') {{ $setting->sitename }} @endsection @section('description') {{ $setting->description }} @endsection @section('konten') <div class="col-sm-12 col-md-12 col-lg-10 col-lg-offset-1 clearfix"> <div class="top-headline"> <?php $set = App\Setting::find(1); ?> <h1 class="headline-title">{{ $set->sitename }}</h1> <div class="separator"><i class="fa fa-anchor"></i></div> <h4 class="description"> {{ $set->description }} </h4> <div class="detail-button"> <a href="#" class="btn scrolling-btn">Details</a> </div> <!-- end detail-button --> </div> <!-- end headline -->
public function run() { App\Setting::truncate(); factory(App\Setting::class, 2)->create(); }
</div> <!-- end col-sm-9 --> <div class="seperator col-sm-12 hidden-xs"></div> <div class="copyright col-xs-12 col-sm-7"> Copyright © {{ date('Y') }} Dinas Perikanan dan Kelautan Kab. Bantaeng </div> <!-- end copyright --> <div class="social-icon col-xs-12 col-sm-5"> <ul> <?php $Sos = App\Setting::find(1); ?> <li><a href="{{ $Sos->fb }}" target="_blank"><i class="fa fa-facebook"></i></a></li> <li><a href="{{ $Sos->twitter }}" target="_blank"><i class="fa fa-twitter"></i></a></li> <!-- <li><a href="" target="_blank"><i class="fa fa-linkedin"></i></a></li> --> </ul> </div> <!-- end social-icon --> </div> <!-- end container --> </footer> <!-- END FOOTER -->