Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
dd64cba897 | ||
|
8093eb8b72 | ||
|
af1ea1b5fd | ||
|
a4650f8710 | ||
|
4b25f97314 | ||
|
2eaf000ce0 | ||
|
1f114667aa | ||
|
f801001571 | ||
|
45be8553a2 |
@@ -45,14 +45,14 @@
|
|||||||
<p class="login-box-msg">{{ trans('adminlte_lang::message.siginsession') }}</p>
|
<p class="login-box-msg">{{ trans('adminlte_lang::message.siginsession') }}</p>
|
||||||
|
|
||||||
<form method="post">
|
<form method="post">
|
||||||
{{ csrf_field() }}
|
@csrf
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="input-group mb-3">
|
<div class="input-group mb-3">
|
||||||
<input type="email" name="email" class="form-control" placeholder="Email">
|
<input type="email" name="email" class="form-control" placeholder="Email">
|
||||||
<div class="input-group-append">
|
<div class="input-group-append">
|
||||||
<span class="input-group-text"><i class="fas fa-envelope fa-fw"></i></span>
|
<span class="input-group-text"><i class="fas fa-fw fa-envelope"></i></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -61,7 +61,7 @@
|
|||||||
<div class="input-group mb-3">
|
<div class="input-group mb-3">
|
||||||
<input type="password" name="password" class="form-control" placeholder="Password">
|
<input type="password" name="password" class="form-control" placeholder="Password">
|
||||||
<div class="input-group-append">
|
<div class="input-group-append">
|
||||||
<span class="input-group-text"><i class="fas fa-key fa-fw"></i></span>
|
<span class="input-group-text"><i class="fas fa-fw fa-key"></i></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -35,13 +35,15 @@
|
|||||||
<p class="login-box-msg">You forgot your password? Here you can easily retrieve a new password.</p>
|
<p class="login-box-msg">You forgot your password? Here you can easily retrieve a new password.</p>
|
||||||
|
|
||||||
<form method="post" action="{{ url('password/email') }}">
|
<form method="post" action="{{ url('password/email') }}">
|
||||||
{{ csrf_field() }}
|
@csrf
|
||||||
|
|
||||||
<div class="input-group mb-3">
|
<div class="input-group mb-3">
|
||||||
<input type="email" name="email" class="form-control" placeholder="Email" required>
|
<input type="email" name="email" class="form-control" placeholder="Email" required>
|
||||||
<div class="input-group-append">
|
<div class="input-group-append">
|
||||||
<span class="fas fa-envelope input-group-text"></span>
|
<span class="input-group-text"><i class="fas fa-fw fa-envelope"></i></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<button type="submit" class="btn btn-primary btn-block">{{ trans('adminlte_lang::message.sendpassword') }}</button>
|
<button type="submit" class="btn btn-primary btn-block">{{ trans('adminlte_lang::message.sendpassword') }}</button>
|
||||||
|
@@ -27,32 +27,36 @@
|
|||||||
<p class="login-box-msg">You are only one step a way from your new password, set your new password now.</p>
|
<p class="login-box-msg">You are only one step a way from your new password, set your new password now.</p>
|
||||||
|
|
||||||
<form method="post" action="{{ url('password/reset') }}">
|
<form method="post" action="{{ url('password/reset') }}">
|
||||||
{{ csrf_field() }}
|
<input type="hidden" name="token" value="{{ $token }}">
|
||||||
|
@csrf
|
||||||
|
|
||||||
<div class="input-group mb-3">
|
<div class="input-group mb-3">
|
||||||
<input type="email" name="email" class="form-control" placeholder="Email" required>
|
<input type="email" name="email" class="form-control" placeholder="Email" required>
|
||||||
<div class="input-group-append">
|
<div class="input-group-append">
|
||||||
<span class="fas fa-envelope fa-fw input-group-text"></span>
|
<span class="input-group-text"><i class="fas fa-fw fa-envelope"></i></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="input-group mb-3">
|
<div class="input-group mb-3">
|
||||||
<input type="password" name="password" class="form-control" placeholder="Password" required>
|
<input type="password" name="password" class="form-control" placeholder="Password" required>
|
||||||
<div class="input-group-append">
|
<div class="input-group-append">
|
||||||
<span class="fas fa-lock input-group-text"></span>
|
<span class="input-group-text"><i class="fas fa-fw fa-lock"></i></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="input-group mb-3">
|
<div class="input-group mb-3">
|
||||||
<input type="password" name="password_confirmation" class="form-control" placeholder="Confirm Password" data-match="#password" required>
|
<input type="password" name="password_confirmation" class="form-control" placeholder="Confirm Password" data-match="#password" required>
|
||||||
<div class="input-group-append">
|
<div class="input-group-append">
|
||||||
<span class="fas fa-lock input-group-text"></span>
|
<span class="input-group-text"><i class="fas fa-fw fa-clone"></i></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<button type="submit" class="btn btn-primary btn-block">{{ trans('adminlte_lang::message.passwordreset') }}</button>
|
<button type="submit" class="btn btn-primary btn-block">{{ trans('adminlte_lang::message.passwordreset') }}</button>
|
||||||
</div>
|
</div>
|
||||||
<!-- /.col -->
|
<!-- /.col -->
|
||||||
</div>
|
</div>
|
||||||
<input type="hidden" name="token" value="{{ $token }}">
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<p class="mt-3 mb-1">
|
<p class="mt-3 mb-1">
|
||||||
|
@@ -46,7 +46,7 @@
|
|||||||
|
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
@if ($user->switched)
|
@if ($user->switched)
|
||||||
<a href="{{ url('/admin/switch/stop') }}" class="dropdown-item" id="switch">
|
<a href="{{ url('/admin/switch/stop') }}" class="dropdown-item">
|
||||||
<i class="fas fa-sign-out-alt mr-2"></i> {{ trans('adminlte_lang::message.switchoff') }}
|
<i class="fas fa-sign-out-alt mr-2"></i> {{ trans('adminlte_lang::message.switchoff') }}
|
||||||
</a>
|
</a>
|
||||||
@else
|
@else
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
<aside class="main-sidebar sidebar-dark-primary elevation-4 d-print-none">
|
<aside class="main-sidebar sidebar-dark-primary elevation-4 d-print-none">
|
||||||
<!-- Brand Logo -->
|
<!-- Brand Logo -->
|
||||||
<a href="{{ url('home') }}" class="brand-link">
|
<a href="{{ url('home') }}" class="brand-link">
|
||||||
<img src="{{ asset('img/logo.png') }}" alt="Logo" class="brand-image img-circle elevation-3" style="opacity: .8">
|
<img src="{{ asset('img/logo.png') }}" alt="Logo" style="margin-left: 0; padding: 5px;" class="brand-image">
|
||||||
<span class="brand-text font-weight-light">{!! config('app.name_html_long','<b>App</b>Name') !!}</span>
|
<span class="brand-text font-weight-light">{!! config('app.name_html_long','<b>App</b>Name') !!}</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
@@ -6,9 +6,9 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<!-- BEGIN BOTTOM ABOUT BLOCK -->
|
<!-- BEGIN BOTTOM ABOUT BLOCK -->
|
||||||
<div class="col-md-4 col-sm-6 pre-footer-col">
|
<div class="col-md-4 col-sm-6 pre-footer-col">
|
||||||
@isset($so->site_aboutus))
|
@isset($site->site_aboutus))
|
||||||
<h2>About us</h2>
|
<h2>About us</h2>
|
||||||
<p>{!! $so->site_aboutus !!}</p>
|
<p>{!! $site->site_aboutus !!}</p>
|
||||||
<!--
|
<!--
|
||||||
<div class="photo-stream">
|
<div class="photo-stream">
|
||||||
<h2>Photos Stream</h2>
|
<h2>Photos Stream</h2>
|
||||||
@@ -26,11 +26,11 @@
|
|||||||
<h2 style="text-align: right;">Our Contact Details</h2>
|
<h2 style="text-align: right;">Our Contact Details</h2>
|
||||||
<address class="margin-bottom-40" style="float: right;">
|
<address class="margin-bottom-40" style="float: right;">
|
||||||
<table>
|
<table>
|
||||||
<tr><th style="vertical-align:top; padding-right: 5px;">Address</th><td>{!! $so->address('html') !!}</td></tr>
|
<tr><th style="vertical-align:top; padding-right: 5px;">Address</th><td>{!! join('<br>',$site->address) !!}</td></tr>
|
||||||
@isset($so->site_fax)
|
@isset($site->site_fax)
|
||||||
<tr><th>Fax</th><td>{{ $so->site_fax }}</tr>
|
<tr><th>Fax</th><td>{{ $site->site_fax }}</tr>
|
||||||
@endif
|
@endif
|
||||||
<tr><th>Email</th><td> <a href="mailto:{{ $so->site_email }}">{{ $so->site_email }}</a></tr>
|
<tr><th>Email</th><td> <a href="mailto:{{ $site->site_email }}">{{ $site->site_email }}</a></tr>
|
||||||
</table>
|
</table>
|
||||||
</address>
|
</address>
|
||||||
<!--
|
<!--
|
||||||
@@ -81,8 +81,8 @@
|
|||||||
<!-- BEGIN SOCIAL -->
|
<!-- BEGIN SOCIAL -->
|
||||||
<div class="col-md-4 col-sm-4">
|
<div class="col-md-4 col-sm-4">
|
||||||
<ul class="social-footer list-unstyled list-inline pull-right">
|
<ul class="social-footer list-unstyled list-inline pull-right">
|
||||||
@foreach ($so->social as $social)
|
@foreach ($site->social as $social)
|
||||||
<li><a href="{{ $social['url'] }}"><i class="fa fa-{{ $social['name'] }}"></i></a></li>
|
<li><a href="{{ $social['url'] }}"><i class="fab fa-{{ $social['name'] }}"></i></a></li>
|
||||||
@endforeach
|
@endforeach
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -23,13 +23,13 @@
|
|||||||
<link href="//fonts.googleapis.com/css?family=Open+Sans:300,400,600,700|PT+Sans+Narrow|Source+Sans+Pro:200,300,400,600,700,900&subset=all" rel="stylesheet" type="text/css">
|
<link href="//fonts.googleapis.com/css?family=Open+Sans:300,400,600,700|PT+Sans+Narrow|Source+Sans+Pro:200,300,400,600,700,900&subset=all" rel="stylesheet" type="text/css">
|
||||||
|
|
||||||
<meta property="og:site_name" content="{{ config('app.name') }}" />
|
<meta property="og:site_name" content="{{ config('app.name') }}" />
|
||||||
<meta property="og:title" content="{{ $so->site_name }}" />
|
<meta property="og:title" content="{{ $site->site_name }}" />
|
||||||
<meta property="og:description" content="{{ $so->site_description }}" />
|
<meta property="og:description" content="{{ $site->site_description }}" />
|
||||||
<meta property="og:type" content="website" />
|
<meta property="og:type" content="website" />
|
||||||
<meta property="og:image" content="{{ $so->site_logo }}" />
|
<meta property="og:image" content="{{ $site->site_logo }}" />
|
||||||
<meta property="og:url" content="{{ url('/') }}" />
|
<meta property="og:url" content="{{ url('/') }}" />
|
||||||
|
|
||||||
<link rel="shortcut icon" href="{{ object_get($so,'favicon','favicon.ico') }}" />
|
<link rel="shortcut icon" href="{{ object_get($site,'favicon','favicon.ico') }}" />
|
||||||
|
|
||||||
<!-- Custom CSS -->
|
<!-- Custom CSS -->
|
||||||
@css('css/custom.css')
|
@css('css/custom.css')
|
||||||
|
@@ -5,8 +5,8 @@
|
|||||||
<!-- BEGIN TOP BAR LEFT PART -->
|
<!-- BEGIN TOP BAR LEFT PART -->
|
||||||
<div class="col-md-6 col-sm-6 additional-shop-info">
|
<div class="col-md-6 col-sm-6 additional-shop-info">
|
||||||
<ul class="list-unstyled list-inline">
|
<ul class="list-unstyled list-inline">
|
||||||
<li><i class="fas fa-phone mr-4"></i><span>{!! $so->site_phone !!}</span></li>
|
<li><i class="fas fa-phone mr-4"></i><span>{!! $site->site_phone !!}</span></li>
|
||||||
<li><i class="fas fa-envelope mr-4"></i><span>{!! $so->site_email !!}</span></li>
|
<li><i class="fas fa-envelope mr-4"></i><span>{!! $site->site_email !!}</span></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<!-- END TOP BAR LEFT PART -->
|
<!-- END TOP BAR LEFT PART -->
|
||||||
@@ -29,14 +29,14 @@
|
|||||||
<!-- BEGIN HEADER -->
|
<!-- BEGIN HEADER -->
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<a class="site-logo" href="{{ url('/') }}"><img src="{{ $so->site_logo }}" alt="{{ $so->site_description }}" height="32"></a>
|
<a class="site-logo" href="{{ url('/') }}"><img src="{{ $site->site_logo }}" alt="{{ $site->site_description }}" height="32"></a>
|
||||||
<a href="javascript:void(0);" class="mobi-toggler"><i class="fa fa-bars"></i></a>
|
<a href="javascript:void(0);" class="mobi-toggler"><i class="fa fa-bars"></i></a>
|
||||||
|
|
||||||
<!-- BEGIN NAVIGATION -->
|
<!-- BEGIN NAVIGATION -->
|
||||||
<div class="header-navigation pull-right font-transform-inherit">
|
<div class="header-navigation pull-right font-transform-inherit">
|
||||||
<ul>
|
<ul>
|
||||||
{{-- @todo Replace this with a function that can traverse children with multiple depths --}}
|
{{-- @todo Replace this with a function that can traverse children with multiple depths --}}
|
||||||
@foreach ($so->top_menu as $item => $menu)
|
@foreach ($site->top_menu as $item => $menu)
|
||||||
<li class="dropdown {{ Request::is($menu['url']) ? 'active' : '' }}">
|
<li class="dropdown {{ Request::is($menu['url']) ? 'active' : '' }}">
|
||||||
|
|
||||||
@if (! \Illuminate\Support\Arr::get($menu,'children'))
|
@if (! \Illuminate\Support\Arr::get($menu,'children'))
|
||||||
|
@@ -15,15 +15,38 @@ class Carbon extends CarbonBase
|
|||||||
|
|
||||||
public function __get($name)
|
public function __get($name)
|
||||||
{
|
{
|
||||||
switch (true) {
|
switch ($name) {
|
||||||
case $name === 'half':
|
case 'half':
|
||||||
return (int) ceil($this->month / static::MONTHS_PER_HALF);
|
return (int) ceil($this->month / static::MONTHS_PER_HALF);
|
||||||
|
|
||||||
|
case 'quarter_string':
|
||||||
|
return sprintf('%dQ%d',$this->year,$this->quarter);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return parent::__get($name);
|
return parent::__get($name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function addHalf(): self
|
||||||
|
{
|
||||||
|
return $this->addHalves(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function addHalves(int $unit): self
|
||||||
|
{
|
||||||
|
return $this->addQuarters(2*$unit);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function subHalf(): self
|
||||||
|
{
|
||||||
|
return $this->subHalves(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function subHalves(int $unit): self
|
||||||
|
{
|
||||||
|
return $this->subQuarters(2*$unit);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Modify to the first occurrence of a given day of the week
|
* Modify to the first occurrence of a given day of the week
|
||||||
* in the current quarter. If no dayOfWeek is provided, modify to the
|
* in the current quarter. If no dayOfWeek is provided, modify to the
|
||||||
@@ -35,7 +58,7 @@ class Carbon extends CarbonBase
|
|||||||
* @return static
|
* @return static
|
||||||
*/
|
*/
|
||||||
public function startOfHalf($dayOfWeek = null)
|
public function startOfHalf($dayOfWeek = null)
|
||||||
{
|
{
|
||||||
return $this->setDate($this->year, $this->half * static::MONTHS_PER_HALF - 5, 1)->firstOfMonth($dayOfWeek);
|
return $this->setDate($this->year, $this->half * static::MONTHS_PER_HALF - 5, 1)->firstOfMonth($dayOfWeek);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -50,7 +73,7 @@ class Carbon extends CarbonBase
|
|||||||
* @return static
|
* @return static
|
||||||
*/
|
*/
|
||||||
public function endOfHalf($dayOfWeek = null)
|
public function endOfHalf($dayOfWeek = null)
|
||||||
{
|
{
|
||||||
return $this->setDate($this->year, $this->half * static::MONTHS_PER_HALF, 1)->lastOfMonth($dayOfWeek);
|
return $this->setDate($this->year, $this->half * static::MONTHS_PER_HALF, 1)->lastOfMonth($dayOfWeek);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
45
src/Traits/SingleOrFail.php
Normal file
45
src/Traits/SingleOrFail.php
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Extend Eloquent so that it includes singleOrFail calls to test that a query returns only 1 record
|
||||||
|
*/
|
||||||
|
namespace Leenooks\Traits;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Builder;
|
||||||
|
use Illuminate\Database\Eloquent\ModelNotFoundException;
|
||||||
|
|
||||||
|
trait SingleOrFail
|
||||||
|
{
|
||||||
|
public static function bootSingleOrfail(): void
|
||||||
|
{
|
||||||
|
// When a query should return 1 object, or FAIL if it doesnt
|
||||||
|
Builder::macro('singleOrFail',function () {
|
||||||
|
$result = $this->get();
|
||||||
|
|
||||||
|
if (($x=$result->count()) == 1)
|
||||||
|
return $result->first();
|
||||||
|
|
||||||
|
throw new ModelNotFoundException(sprintf('Query brings back %d record(s) called for singleOrFail()',$x));
|
||||||
|
});
|
||||||
|
|
||||||
|
// When a query should return 1 object, or NULL if it doesnt
|
||||||
|
Builder::macro('single',function () {
|
||||||
|
$result = $this->get();
|
||||||
|
|
||||||
|
if ($result->count() == 1)
|
||||||
|
return $result->first();
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
});
|
||||||
|
|
||||||
|
// When a query should return 1 object, or NULL if it doesnt
|
||||||
|
Builder::macro('singleOrNew',function ($args) {
|
||||||
|
$result = $this->where($args)->get();
|
||||||
|
|
||||||
|
if ($result->count() == 1)
|
||||||
|
return $result->first();
|
||||||
|
|
||||||
|
return $this->newModelInstance($args);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user