public function home() { // if set launching time $launchingDateTime = globalParams('launching_datetime') ? new Carbon(globalParams('launching_datetime')) : Carbon::now(); // check if has home permalink $permalink = Permalink::withDependencies()->whereIn('permalink', ['/', ''])->first(); // if home exist or not yet launch if ($permalink == null || $launchingDateTime->isFuture()) { return redirect('coming-soon'); } $post = $permalink->postable; $title = globalParams('home_title', config('livecms.home_title', 'Home')); return view(theme('front', 'home'), compact('post', 'title')); }
@extends('livecms::themes.adminLTE.template') <?php $title = 'Login'; $userImages = LiveCMS\Models\Core\User::whereNotNull('background')->get(); $loginBackground = count($userImages) ? $userImages->random()->background_large_cover : '/background/' . globalParams('background_image', 'keyboard.jpg'); ?> @section('templateBody') <body class="hold-transition login-page" style="background-image: url({{$loginBackground}})"> <div class="login-box"> <div class="login-logo"> <a href="/">{{ globalParams('site_name', 'Live CMS') }}</a> </div> <!-- /.login-logo --> <div class="login-box-body"> <p class="login-box-msg text-black">Sign in to start your session</p> {!! Form::open() !!} @if($errors->first('email')) <span class="lead label label-danger">{{ $errors->first('email') }}</span>@endif <div class="form-group has-feedback"> {!! Form::text('email', null, ['class' => 'form-control', 'placeholder' => 'Email']) !!} <span class="glyphicon glyphicon-envelope form-control-feedback"></span> </div> @if($errors->first('password')) <span class="lead label label-danger">{{ $errors->first('password') }}</span>@endif <div class="form-group has-feedback"> {!! Form::password('password', ['class' => 'form-control', 'placeholder' => 'Password']) !!} <span class="glyphicon glyphicon-lock form-control-feedback"></span> </div> <div class="row">
function disqusComment($artile, $disqusId = null, $url = null, $title = null, $identifier = null) { return ' <div id="disqus_thread"></div> <script> var disqus_config = function () { this.page.url = \'' . ($url ?: request()->url()) . '\'; this.page.identifier = \'' . ($identifier ?: $artile->id) . '\'; this.page.title = \'' . ($title ?: $artile->title) . '\'; }; (function() { // REQUIRED CONFIGURATION VARIABLE: EDIT THE SHORTNAME BELOW var d = document, s = d.createElement(\'script\'); s.src = \'//' . ($disqusId ?: globalParams('disqus_id')) . '.disqus.com/embed.js\'; s.setAttribute(\'data-timestamp\', +new Date()); (d.head || d.body).appendChild(s); })(); </script> <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript> '; }
/** * Handle an incoming request. * * @param \Illuminate\Http\Request $request * @param \Closure $next * @return mixed */ public function handle($request, Closure $next) { view()->share('global_params', globalParams()); return $next($request); }
public function __construct() { $this->global_params = globalParams(); $this->view = new BackendView($this); }