Changed SITE_SETUP to SITE, using ->address instead of ->address(), added email_log, is now in views
This commit is contained in:
parent
c34da6bfb8
commit
34139bcbc2
@ -5,7 +5,7 @@ namespace App\Http\Controllers;
|
|||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Arr;
|
use Illuminate\Support\Arr;
|
||||||
|
|
||||||
use App\Models\{Service,SiteDetails};
|
use App\Models\{Service,SiteDetail};
|
||||||
|
|
||||||
class AdminController extends Controller
|
class AdminController extends Controller
|
||||||
{
|
{
|
||||||
@ -39,9 +39,10 @@ class AdminController extends Controller
|
|||||||
'social' => 'nullable|array',
|
'social' => 'nullable|array',
|
||||||
'top_menu' => 'nullable|array',
|
'top_menu' => 'nullable|array',
|
||||||
'site_logo' => 'nullable|image',
|
'site_logo' => 'nullable|image',
|
||||||
|
'email_logo' => 'nullable|image',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$so = config('SITE_SETUP');
|
$site = config('SITE');
|
||||||
|
|
||||||
// @todo - not currently rendered in the home page
|
// @todo - not currently rendered in the home page
|
||||||
$validated['social'] = [];
|
$validated['social'] = [];
|
||||||
@ -50,9 +51,9 @@ class AdminController extends Controller
|
|||||||
// Handle the images
|
// Handle the images
|
||||||
foreach(['site_logo','email_logo'] as $key)
|
foreach(['site_logo','email_logo'] as $key)
|
||||||
if (array_key_exists($key,$validated))
|
if (array_key_exists($key,$validated))
|
||||||
$validated[$key] = ($x=$validated[$key])->storeAs('site/'.config('SITE_SETUP')->site_id,$x->getClientOriginalName(),'public');
|
$validated[$key] = ($x=$validated[$key])->storeAs('site/'.$site->site_id,$x->getClientOriginalName(),'public');
|
||||||
|
|
||||||
foreach ($so->details as $oo)
|
foreach ($site->details as $oo)
|
||||||
if (array_key_exists($oo->key,$validated)) {
|
if (array_key_exists($oo->key,$validated)) {
|
||||||
$oo->value = Arr::get($validated,$oo->key);
|
$oo->value = Arr::get($validated,$oo->key);
|
||||||
$oo->save();
|
$oo->save();
|
||||||
@ -62,11 +63,11 @@ class AdminController extends Controller
|
|||||||
|
|
||||||
// Left over values to be created.
|
// Left over values to be created.
|
||||||
foreach ($validated as $k=>$v) {
|
foreach ($validated as $k=>$v) {
|
||||||
$oo = new SiteDetails;
|
$oo = new SiteDetail;
|
||||||
$oo->key = $k;
|
$oo->key = $k;
|
||||||
$oo->value = $v ?: '';
|
$oo->value = $v ?: '';
|
||||||
|
|
||||||
$so->details()->save($oo);
|
$site->details()->save($oo);
|
||||||
}
|
}
|
||||||
|
|
||||||
return redirect()->back()
|
return redirect()->back()
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
use App\Http\Requests;
|
|
||||||
use Image;
|
use Image;
|
||||||
|
|
||||||
class MediaController extends Controller
|
class MediaController extends Controller
|
||||||
@ -10,8 +9,9 @@ class MediaController extends Controller
|
|||||||
/**
|
/**
|
||||||
* Create a generic image
|
* Create a generic image
|
||||||
*
|
*
|
||||||
* @param $width
|
* @param $width
|
||||||
* @param $height
|
* @param $height
|
||||||
|
* @param string $color
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function image($width,$height,$color='#ccc') {
|
public function image($width,$height,$color='#ccc') {
|
||||||
|
@ -71,11 +71,11 @@ class OrderController extends Controller
|
|||||||
if (! $uo->exists)
|
if (! $uo->exists)
|
||||||
{
|
{
|
||||||
// @todo Make this automatic
|
// @todo Make this automatic
|
||||||
$uo->site_id = config('SITE_SETUP')->id;
|
$uo->site_id = config('SITE')->id;
|
||||||
$uo->active = FALSE;
|
$uo->active = FALSE;
|
||||||
$uo->firstname = '';
|
$uo->firstname = '';
|
||||||
$uo->lastname = '';
|
$uo->lastname = '';
|
||||||
$uo->country_id = config('SITE_SETUP')->country_id; // @todo This might be wrong
|
$uo->country_id = config('SITE')->country_id; // @todo This might be wrong
|
||||||
$uo->parent_id = Auth::id() ?: 1; // @todo This should be configured to a default user
|
$uo->parent_id = Auth::id() ?: 1; // @todo This should be configured to a default user
|
||||||
$uo->active = 1;
|
$uo->active = 1;
|
||||||
$uo->save();
|
$uo->save();
|
||||||
@ -88,10 +88,10 @@ class OrderController extends Controller
|
|||||||
$ao = new Account;
|
$ao = new Account;
|
||||||
//$ao->id = Account::NextId();
|
//$ao->id = Account::NextId();
|
||||||
// @todo Make this automatic
|
// @todo Make this automatic
|
||||||
$ao->site_id = config('SITE_SETUP')->id;
|
$ao->site_id = config('SITE')->id;
|
||||||
$ao->country_id = config('SITE_SETUP')->country_id; // @todo This might be wrong
|
$ao->country_id = config('SITE')->country_id; // @todo This might be wrong
|
||||||
$ao->language_id = config('SITE_SETUP')->language_id; // @todo This might be wrong
|
$ao->language_id = config('SITE')->language_id; // @todo This might be wrong
|
||||||
$ao->currency_id = config('SITE_SETUP')->currency_id; // @todo This might be wrong
|
$ao->currency_id = config('SITE')->currency_id; // @todo This might be wrong
|
||||||
$ao->active = 1;
|
$ao->active = 1;
|
||||||
$uo->accounts()->save($ao);
|
$uo->accounts()->save($ao);
|
||||||
|
|
||||||
@ -102,7 +102,7 @@ class OrderController extends Controller
|
|||||||
$so = new Service;
|
$so = new Service;
|
||||||
|
|
||||||
// @todo Make this automatic
|
// @todo Make this automatic
|
||||||
$so->site_id = config('SITE_SETUP')->id;
|
$so->site_id = config('SITE')->id;
|
||||||
$so->product_id = $request->input('product_id');
|
$so->product_id = $request->input('product_id');
|
||||||
$so->order_status = 'ORDER-SUBMIT';
|
$so->order_status = 'ORDER-SUBMIT';
|
||||||
$so->orderby_id = Auth::id();
|
$so->orderby_id = Auth::id();
|
||||||
|
@ -43,9 +43,9 @@ class SetSite
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set who we are in SETUP.
|
// Set who we are in SETUP.
|
||||||
Config::set('SITE_SETUP',$so);
|
Config::set('SITE',$so);
|
||||||
if (! $request->ajax())
|
if (! $request->ajax())
|
||||||
View::share('so',$so);
|
View::share('site',$so);
|
||||||
|
|
||||||
return $next($request);
|
return $next($request);
|
||||||
}
|
}
|
||||||
|
@ -149,6 +149,20 @@ class Account extends Model implements IDs
|
|||||||
return $this->getUrlAdminAttribute();
|
return $this->getUrlAdminAttribute();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the address for the account
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function getAddressAttribute(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
$this->address1,
|
||||||
|
$this->address2,
|
||||||
|
sprintf('%s %s %s',$this->city.(($this->state OR $this->zip) ? ',' : ''),$this->state,$this->zip)
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the Account Unique Identifier
|
* Return the Account Unique Identifier
|
||||||
* @return string
|
* @return string
|
||||||
@ -219,36 +233,7 @@ class Account extends Model implements IDs
|
|||||||
return sprintf('<a href="/u/account/view/%s">%s</a>',$this->id,$this->account_id);
|
return sprintf('<a href="/u/account/view/%s">%s</a>',$this->id,$this->account_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** FUNCTIONS **/
|
/* GENERAL METHODS */
|
||||||
|
|
||||||
private function _address()
|
|
||||||
{
|
|
||||||
$return = [];
|
|
||||||
|
|
||||||
if ($this->address1)
|
|
||||||
array_push($return,$this->address1);
|
|
||||||
if ($this->address2)
|
|
||||||
array_push($return,$this->address2);
|
|
||||||
if ($this->city)
|
|
||||||
array_push($return,sprintf('%s %s %s',$this->city.(($this->state OR $this->zip) ? ',' : ''),$this->state,$this->zip));
|
|
||||||
|
|
||||||
if (! $return)
|
|
||||||
$return = ['No Address'];
|
|
||||||
|
|
||||||
return $return;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function address($type='plain')
|
|
||||||
{
|
|
||||||
switch ($type)
|
|
||||||
{
|
|
||||||
case 'html' : return join('<br>',$this->_address());
|
|
||||||
case 'newline': return join("\m",$this->_address());
|
|
||||||
|
|
||||||
default:
|
|
||||||
return join("\n",$this->_address());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the due invoices on an account
|
* Get the due invoices on an account
|
||||||
|
@ -139,7 +139,7 @@ class Invoice extends Model implements IDs
|
|||||||
// @todo Move this to a site configuration
|
// @todo Move this to a site configuration
|
||||||
public function getInvoiceTextAttribute()
|
public function getInvoiceTextAttribute()
|
||||||
{
|
{
|
||||||
return sprintf('Thank you for using %s for your Internet Services.',config('SITE_SETUP')->site_name);
|
return sprintf('Thank you for using %s for your Internet Services.',config('SITE')->site_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -100,7 +100,7 @@ class Product extends Model implements IDs
|
|||||||
|
|
||||||
private function getDefaultLanguage()
|
private function getDefaultLanguage()
|
||||||
{
|
{
|
||||||
return config('SITE_SETUP')->language;
|
return config('SITE')->language;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getDescriptionAttribute()
|
public function getDescriptionAttribute()
|
||||||
|
@ -31,7 +31,7 @@ class Site extends Model
|
|||||||
|
|
||||||
public function details()
|
public function details()
|
||||||
{
|
{
|
||||||
return $this->hasMany(SiteDetails::class,NULL,'site_id');
|
return $this->hasMany(SiteDetail::class,NULL,'site_id');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function language()
|
public function language()
|
||||||
@ -60,7 +60,7 @@ class Site extends Model
|
|||||||
return $x;
|
return $x;
|
||||||
|
|
||||||
if (is_null($details))
|
if (is_null($details))
|
||||||
$details = new SiteDetails;
|
$details = new SiteDetail;
|
||||||
|
|
||||||
// Get a default value for this key
|
// Get a default value for this key
|
||||||
$value = $details->sample($key);
|
$value = $details->sample($key);
|
||||||
@ -88,6 +88,15 @@ class Site extends Model
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getAddressAttribute(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
$this->site_address1,
|
||||||
|
$this->site_address2,
|
||||||
|
sprintf('%s %s %s',$this->site_city.(($this->site_state OR $this->site_postcode) ? ',' : ''),$this->site_state,$this->site_postcode)
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add the path to the mail logo, so it can be displayed.
|
* Add the path to the mail logo, so it can be displayed.
|
||||||
*
|
*
|
||||||
@ -108,35 +117,4 @@ class Site extends Model
|
|||||||
{
|
{
|
||||||
return (($x=$this->detail_item('site_logo')) !== NULL) ? '/storage/'.$x : '/image/generic/150/20/fff';
|
return (($x=$this->detail_item('site_logo')) !== NULL) ? '/storage/'.$x : '/image/generic/150/20/fff';
|
||||||
}
|
}
|
||||||
|
|
||||||
// @todo - To optimize
|
|
||||||
private function _address()
|
|
||||||
{
|
|
||||||
$return = [];
|
|
||||||
|
|
||||||
if ($this->site_address1)
|
|
||||||
array_push($return,$this->site_address1);
|
|
||||||
if ($this->site_address2)
|
|
||||||
array_push($return,$this->site_address2);
|
|
||||||
if ($this->site_city)
|
|
||||||
array_push($return,sprintf('%s %s %s',$this->site_city.(($this->site_state OR $this->site_postcode) ? ',' : ''),$this->site_state,$this->site_postcode));
|
|
||||||
|
|
||||||
if (! $return)
|
|
||||||
$return = ['No Address'];
|
|
||||||
|
|
||||||
return $return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// @todo - To optimize
|
|
||||||
public function address($type='plain')
|
|
||||||
{
|
|
||||||
switch ($type)
|
|
||||||
{
|
|
||||||
case 'html' : return join('<br>',$this->_address());
|
|
||||||
case 'newline': return join("\m",$this->_address());
|
|
||||||
|
|
||||||
default:
|
|
||||||
return join("\n",$this->_address());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
@ -6,7 +6,7 @@ use Illuminate\Database\Eloquent\Model;
|
|||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Leenooks\Traits\CompositeKeys;
|
use Leenooks\Traits\CompositeKeys;
|
||||||
|
|
||||||
class SiteDetails extends Model
|
class SiteDetail extends Model
|
||||||
{
|
{
|
||||||
use CompositeKeys;
|
use CompositeKeys;
|
||||||
|
|
||||||
@ -189,6 +189,7 @@ class SiteDetails extends Model
|
|||||||
['title'=>'Title 3','text'=>'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.','icon'=>'fa fa-check red','image'=>'/image/generic/200/100/999'],
|
['title'=>'Title 3','text'=>'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.','icon'=>'fa fa-check red','image'=>'/image/generic/200/100/999'],
|
||||||
],
|
],
|
||||||
*/
|
*/
|
||||||
|
'email_logo'=>route('image',['width'=>150,'height'=>20,'color'=>'eee']),
|
||||||
'site_address1' => 'Address line 1',
|
'site_address1' => 'Address line 1',
|
||||||
'site_address2' => 'Address line 2',
|
'site_address2' => 'Address line 2',
|
||||||
'site_description'=>'Example Site',
|
'site_description'=>'Example Site',
|
@ -23,7 +23,7 @@ trait NextKey
|
|||||||
$model->id = self::NextId();
|
$model->id = self::NextId();
|
||||||
|
|
||||||
if (! $model->site_id)
|
if (! $model->site_id)
|
||||||
$model->site_id = config('SITE_SETUP')->id;
|
$model->site_id = config('SITE')->id;
|
||||||
});
|
});
|
||||||
|
|
||||||
static::saved(function($model)
|
static::saved(function($model)
|
||||||
@ -40,14 +40,14 @@ trait NextKey
|
|||||||
|
|
||||||
$mo = new Module;
|
$mo = new Module;
|
||||||
$mo->name = $model::RECORD_ID;
|
$mo->name = $model::RECORD_ID;
|
||||||
$mo->site_id = $model->site_id ?: config('SITE_SETUP')->id;
|
$mo->site_id = $model->site_id ?: config('SITE')->id;
|
||||||
$mo->save();
|
$mo->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $mo->record) {
|
if (! $mo->record) {
|
||||||
$mo->record = new Record;
|
$mo->record = new Record;
|
||||||
$mo->record->module_id = $mo->id;
|
$mo->record->module_id = $mo->id;
|
||||||
$mo->record->site_id = $model->site_id ?: config('SITE_SETUP')->id;
|
$mo->record->site_id = $model->site_id ?: config('SITE')->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
$mo->record->id = $model->id;
|
$mo->record->id = $model->id;
|
||||||
|
@ -43,7 +43,7 @@ trait OrderServiceOptions
|
|||||||
$o->forceFill(array_undot($x));
|
$o->forceFill(array_undot($x));
|
||||||
|
|
||||||
// @todo Make this automatic
|
// @todo Make this automatic
|
||||||
$o->site_id = config('SITE_SETUP')->id;
|
$o->site_id = config('SITE')->id;
|
||||||
|
|
||||||
return $o;
|
return $o;
|
||||||
}
|
}
|
||||||
|
6
composer.lock
generated
6
composer.lock
generated
@ -2884,11 +2884,11 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "leenooks/laravel",
|
"name": "leenooks/laravel",
|
||||||
"version": "9.0.5",
|
"version": "9.0.7",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://dev.leenooks.net/leenooks/laravel",
|
"url": "https://dev.leenooks.net/leenooks/laravel",
|
||||||
"reference": "45be8553a29f1887273b10a56982f55134bfd9e0"
|
"reference": "1f114667aad9c023716516e19a292fbc0748f9a8"
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"creativeorange/gravatar": "^1.0",
|
"creativeorange/gravatar": "^1.0",
|
||||||
@ -2925,7 +2925,7 @@
|
|||||||
"laravel",
|
"laravel",
|
||||||
"leenooks"
|
"leenooks"
|
||||||
],
|
],
|
||||||
"time": "2021-07-01T01:58:50+00:00"
|
"time": "2021-07-01T23:09:31+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "monolog/monolog",
|
"name": "monolog/monolog",
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section('contentheader_title')
|
@section('contentheader_title')
|
||||||
{{ $so->site_name }}
|
{{ $site->site_name }}
|
||||||
@endsection
|
@endsection
|
||||||
@section('contentheader_description')
|
@section('contentheader_description')
|
||||||
Setup
|
Setup
|
||||||
@ -36,7 +36,7 @@
|
|||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="form-group has-validation">
|
<div class="form-group has-validation">
|
||||||
<label for="site_name">Organisation Name</label>
|
<label for="site_name">Organisation Name</label>
|
||||||
<input type="text" class="form-control form-control-border @error('site_name') is-invalid @enderror" id="site_name" name="site_name" placeholder="Site Name..." value="{{ old('site_name',$so->site_name) }}" required>
|
<input type="text" class="form-control form-control-border @error('site_name') is-invalid @enderror" id="site_name" name="site_name" placeholder="Site Name..." value="{{ old('site_name',$site->site_name) }}" required>
|
||||||
<span class="invalid-feedback" role="alert">
|
<span class="invalid-feedback" role="alert">
|
||||||
@error('site_name')
|
@error('site_name')
|
||||||
{{ $message }}
|
{{ $message }}
|
||||||
@ -53,7 +53,7 @@
|
|||||||
<div class="col-10">
|
<div class="col-10">
|
||||||
<div class="form-group has-validation">
|
<div class="form-group has-validation">
|
||||||
<label for="site_logo">Site Logo</label>
|
<label for="site_logo">Site Logo</label>
|
||||||
<input type="file" class="form-control @error('site_logo') is-invalid @enderror" id="site_logo" name="site_logo"><img class="col-12" src="{{ asset($so->site_logo) }}">
|
<input type="file" class="form-control @error('site_logo') is-invalid @enderror" id="site_logo" name="site_logo"><img class="col-12" src="{{ asset($site->site_logo) }}">
|
||||||
<span class="invalid-feedback" role="alert">
|
<span class="invalid-feedback" role="alert">
|
||||||
@error('site_logo')
|
@error('site_logo')
|
||||||
{{ $message }}
|
{{ $message }}
|
||||||
@ -62,6 +62,20 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-10">
|
||||||
|
<div class="form-group has-validation">
|
||||||
|
<label for="email_logo">Email Logo</label>
|
||||||
|
<input type="file" class="form-control @error('email_logo') is-invalid @enderror" id="email_logo" name="email_logo"><img class="col-12" src="{{ asset($site->email_logo) }}">
|
||||||
|
<span class="invalid-feedback" role="alert">
|
||||||
|
@error('email_logo')
|
||||||
|
{{ $message }}
|
||||||
|
@enderror
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-4">
|
<div class="col-4">
|
||||||
@ -69,8 +83,8 @@
|
|||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="form-group has-validation">
|
<div class="form-group has-validation">
|
||||||
<label for="site_address1">Address Lines</label>
|
<label for="site_address1">Address Lines</label>
|
||||||
<input type="text" class="form-control form-control-border @error('site_address1') is-invalid @enderror" id="site_address1" name="site_address1" placeholder="Address1" value="{{ old('site_address1',$so->site_address1) }}" required>
|
<input type="text" class="form-control form-control-border @error('site_address1') is-invalid @enderror" id="site_address1" name="site_address1" placeholder="Address1" value="{{ old('site_address1',$site->site_address1) }}" required>
|
||||||
<input type="text" class="form-control form-control-border" id="site_address2" name="site_address2" placeholder="Address2" value="{{ old('site_address2',$so->site_address2) }}">
|
<input type="text" class="form-control form-control-border" id="site_address2" name="site_address2" placeholder="Address2" value="{{ old('site_address2',$site->site_address2) }}">
|
||||||
<span class="invalid-feedback" role="alert">
|
<span class="invalid-feedback" role="alert">
|
||||||
@error('site_address1')
|
@error('site_address1')
|
||||||
{{ $message }}
|
{{ $message }}
|
||||||
@ -86,7 +100,7 @@
|
|||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="form-group has-validation">
|
<div class="form-group has-validation">
|
||||||
<label for="site_address">City</label>
|
<label for="site_address">City</label>
|
||||||
<input type="text" class="form-control form-control-border @error('site_city') is-invalid @enderror" id="site_city" name="site_city" placeholder="City" value="{{ old('site_city',$so->site_city) }}">
|
<input type="text" class="form-control form-control-border @error('site_city') is-invalid @enderror" id="site_city" name="site_city" placeholder="City" value="{{ old('site_city',$site->site_city) }}">
|
||||||
<span class="invalid-feedback" role="alert">
|
<span class="invalid-feedback" role="alert">
|
||||||
@error('site_city')
|
@error('site_city')
|
||||||
{{ $message }}
|
{{ $message }}
|
||||||
@ -102,7 +116,7 @@
|
|||||||
<div class="col-12" style="display: inline-flex;">
|
<div class="col-12" style="display: inline-flex;">
|
||||||
<div class="form-group has-validation">
|
<div class="form-group has-validation">
|
||||||
<label for="site_address">State</label>
|
<label for="site_address">State</label>
|
||||||
<input type="text" class="form-control form-control-border @error('site_state') is-invalid @enderror col-5" id="site_state" name="site_state" placeholder="State" value="{{ old('site_state',$so->site_state) }}">
|
<input type="text" class="form-control form-control-border @error('site_state') is-invalid @enderror col-5" id="site_state" name="site_state" placeholder="State" value="{{ old('site_state',$site->site_state) }}">
|
||||||
<span class="invalid-feedback" role="alert">
|
<span class="invalid-feedback" role="alert">
|
||||||
@error('site_state')
|
@error('site_state')
|
||||||
{{ $message }}
|
{{ $message }}
|
||||||
@ -114,7 +128,7 @@
|
|||||||
|
|
||||||
<div class="form-group has-validation">
|
<div class="form-group has-validation">
|
||||||
<label for="site_address">Postal Code</label>
|
<label for="site_address">Postal Code</label>
|
||||||
<input type="text" class="form-control form-control-border @error('site_postcode') is-invalid @enderror col-5" id="site_postcode" name="site_postcode" placeholder="Postal Code" value="{{ old('site_postcode',$so->site_postcode) }}">
|
<input type="text" class="form-control form-control-border @error('site_postcode') is-invalid @enderror col-5" id="site_postcode" name="site_postcode" placeholder="Postal Code" value="{{ old('site_postcode',$site->site_postcode) }}">
|
||||||
<span class="invalid-feedback" role="alert">
|
<span class="invalid-feedback" role="alert">
|
||||||
@error('site_postcode')
|
@error('site_postcode')
|
||||||
{{ $message }}
|
{{ $message }}
|
||||||
@ -130,7 +144,7 @@
|
|||||||
<div class="col-4">
|
<div class="col-4">
|
||||||
<div class="form-group has-validation">
|
<div class="form-group has-validation">
|
||||||
<label for="site_phone">Phone</label>
|
<label for="site_phone">Phone</label>
|
||||||
<input type="text" class="form-control form-control-border @error('site_phone') is-invalid @enderror" id="site_phone" name="site_phone" placeholder="Site Phone" value="{{ old('site_phone',$so->site_phone) }}">
|
<input type="text" class="form-control form-control-border @error('site_phone') is-invalid @enderror" id="site_phone" name="site_phone" placeholder="Site Phone" value="{{ old('site_phone',$site->site_phone) }}">
|
||||||
<span class="invalid-feedback" role="alert">
|
<span class="invalid-feedback" role="alert">
|
||||||
@error('site_phone')
|
@error('site_phone')
|
||||||
{{ $message }}
|
{{ $message }}
|
||||||
@ -140,7 +154,7 @@
|
|||||||
|
|
||||||
<div class="form-group has-validation">
|
<div class="form-group has-validation">
|
||||||
<label for="site_fax">Fax</label>
|
<label for="site_fax">Fax</label>
|
||||||
<input type="text" class="form-control form-control-border @error('site_fax') is-invalid @enderror" id="site_fax" name="site_fax" placeholder="Site Fax" value="{{ old('site_fax',$so->site_fax) }}">
|
<input type="text" class="form-control form-control-border @error('site_fax') is-invalid @enderror" id="site_fax" name="site_fax" placeholder="Site Fax" value="{{ old('site_fax',$site->site_fax) }}">
|
||||||
<span class="invalid-feedback" role="alert">
|
<span class="invalid-feedback" role="alert">
|
||||||
@error('site_fax')
|
@error('site_fax')
|
||||||
{{ $message }}
|
{{ $message }}
|
||||||
@ -150,7 +164,7 @@
|
|||||||
|
|
||||||
<div class="form-group has-validation">
|
<div class="form-group has-validation">
|
||||||
<label for="site_email">Email</label>
|
<label for="site_email">Email</label>
|
||||||
<input type="email" class="form-control form-control-border @error('site_email') is-invalid @enderror" id="site_email" name="site_email" placeholder="Site Email" value="{{ old('site_email',$so->site_email) }}" required>
|
<input type="email" class="form-control form-control-border @error('site_email') is-invalid @enderror" id="site_email" name="site_email" placeholder="Site Email" value="{{ old('site_email',$site->site_email) }}" required>
|
||||||
<span class="invalid-feedback" role="alert">
|
<span class="invalid-feedback" role="alert">
|
||||||
@error('site_email')
|
@error('site_email')
|
||||||
{{ $message }}
|
{{ $message }}
|
||||||
@ -163,7 +177,7 @@
|
|||||||
<div class="form-group has-validation">
|
<div class="form-group has-validation">
|
||||||
<label for="site_tax">Tax Number</label>
|
<label for="site_tax">Tax Number</label>
|
||||||
<span class="input-group-prepend">ABN</span>
|
<span class="input-group-prepend">ABN</span>
|
||||||
<input type="text" class="form-control form-control-border @error('site_tax') is-invalid @enderror" id="site_tax" name="site_tax" placeholder="Site Tax" value="{{ old('site_tax',$so->site_tax) }}" required>
|
<input type="text" class="form-control form-control-border @error('site_tax') is-invalid @enderror" id="site_tax" name="site_tax" placeholder="Site Tax" value="{{ old('site_tax',$site->site_tax) }}" required>
|
||||||
<span class="invalid-feedback" role="alert">
|
<span class="invalid-feedback" role="alert">
|
||||||
@error('site_tax')
|
@error('site_tax')
|
||||||
{{ $message }}
|
{{ $message }}
|
||||||
@ -177,7 +191,7 @@
|
|||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="form-group has-validation">
|
<div class="form-group has-validation">
|
||||||
<label for="site_description">Organisation Description</label>
|
<label for="site_description">Organisation Description</label>
|
||||||
<textarea class="form-control @error('site_description') is-invalid @enderror" id="site_description" name="site_description" placeholder="Site Description...">{{ old('site_description',$so->site_description) }}</textarea>
|
<textarea class="form-control @error('site_description') is-invalid @enderror" id="site_description" name="site_description" placeholder="Site Description...">{{ old('site_description',$site->site_description) }}</textarea>
|
||||||
<span class="input-helper">Brief description of site.</span>
|
<span class="input-helper">Brief description of site.</span>
|
||||||
<span class="invalid-feedback" role="alert">
|
<span class="invalid-feedback" role="alert">
|
||||||
@error('site_description')
|
@error('site_description')
|
||||||
@ -192,7 +206,7 @@
|
|||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<a href="{{ url('/') }}" class="btn btn-danger">Cancel</a>
|
<a href="{{ url('/') }}" class="btn btn-danger">Cancel</a>
|
||||||
@can('wholesaler')
|
@can('wholesaler')
|
||||||
<button type="submit" name="submit" class="btn btn-success mr-0 float-end">@if ($so->exists)Save @else Add @endif</button>
|
<button type="submit" name="submit" class="btn btn-success mr-0 float-end">@if ($site->exists)Save @else Add @endif</button>
|
||||||
@endcan
|
@endcan
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-8">
|
<div class="col-8">
|
||||||
<h2>
|
<h2>
|
||||||
<img src="{{ $so->site_logo }}">
|
<img src="{{ $site->site_logo }}">
|
||||||
</h2>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -35,11 +35,11 @@
|
|||||||
<div class="col-4 invoice-col">
|
<div class="col-4 invoice-col">
|
||||||
FROM:
|
FROM:
|
||||||
<address>
|
<address>
|
||||||
<strong>{{ $so->site_name }}</strong><br>
|
<strong>{{ $site->site_name }}</strong><br>
|
||||||
{!! $so->address('html') !!}<br>
|
{!! join('<br>',$site->address) !!}
|
||||||
<br>
|
<br>
|
||||||
<strong>Email:</strong> {{ $so->site_email }}<br>
|
<strong>Email:</strong> {{ $site->site_email }}<br>
|
||||||
<strong>Phone:</strong> {{ $so->site_phone }}
|
<strong>Phone:</strong> {{ $site->site_phone }}
|
||||||
</address>
|
</address>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -47,7 +47,7 @@
|
|||||||
TO:
|
TO:
|
||||||
<address>
|
<address>
|
||||||
<strong>{{ $o->account->company }}</strong><br>
|
<strong>{{ $o->account->company }}</strong><br>
|
||||||
{!! $o->account->address('html') !!}<br>
|
{!! join('<br>',$o->account->address) !!}
|
||||||
<br>
|
<br>
|
||||||
<strong>Email:</strong> {{ $o->account->email }}<br>
|
<strong>Email:</strong> {{ $o->account->email }}<br>
|
||||||
@if ($o->account->phone)
|
@if ($o->account->phone)
|
||||||
|
@ -4,14 +4,14 @@
|
|||||||
<div class="row margin-bottom-40 our-clients">
|
<div class="row margin-bottom-40 our-clients">
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<h2><a href="javascript:;">Our Clients</a></h2>
|
<h2><a href="javascript:;">Our Clients</a></h2>
|
||||||
<p>{{ $so->clients_intro }}</p>
|
<p>{{ $site->clients_intro }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{-- @todo make sure this scrolls --}}
|
{{-- @todo make sure this scrolls --}}
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
<div class="owl-carousel owl-carousel6-brands">
|
<div class="owl-carousel owl-carousel6-brands">
|
||||||
|
|
||||||
@foreach($so->clients as $c)
|
@foreach($site->clients as $c)
|
||||||
<div class="client-item">
|
<div class="client-item">
|
||||||
<a href="javascript:;">
|
<a href="javascript:;">
|
||||||
<img src="{{ $c['image'] }}" class="img-responsive" alt="">
|
<img src="{{ $c['image'] }}" class="img-responsive" alt="">
|
||||||
|
@ -2,14 +2,14 @@
|
|||||||
<div class="col-md-7 tab-style-1">
|
<div class="col-md-7 tab-style-1">
|
||||||
<ul class="nav nav-tabs">
|
<ul class="nav nav-tabs">
|
||||||
@php($c=0)
|
@php($c=0)
|
||||||
@foreach ($so->page_tabs as $o)
|
@foreach ($site->page_tabs as $o)
|
||||||
<li @if(! $c++) class="active" @endif><a href="#tab-{{ $c }}" data-toggle="tab">{{ $o['title'] }}</a></li>
|
<li @if(! $c++) class="active" @endif><a href="#tab-{{ $c }}" data-toggle="tab">{{ $o['title'] }}</a></li>
|
||||||
@endforeach
|
@endforeach
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
@php($c=0)
|
@php($c=0)
|
||||||
@foreach ($so->page_tabs as $o)
|
@foreach ($site->page_tabs as $o)
|
||||||
<div class="tab-pane row fade in @if(! $c++) active @endif" id="tab-{{ $c }}">
|
<div class="tab-pane row fade in @if(! $c++) active @endif" id="tab-{{ $c }}">
|
||||||
<div class="col-md-3 col-sm-3">
|
<div class="col-md-3 col-sm-3">
|
||||||
<a href="{{ $o['image'] }}" class="fancybox-button" title="{{ $o['title'] }}" data-rel="fancybox-button">
|
<a href="{{ $o['image'] }}" class="fancybox-button" title="{{ $o['title'] }}" data-rel="fancybox-button">
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<!-- Carousel items -->
|
<!-- Carousel items -->
|
||||||
<div class="carousel-inner">
|
<div class="carousel-inner">
|
||||||
@php($c=0)
|
@php($c=0)
|
||||||
@foreach($so->testimonials as $o)
|
@foreach($site->testimonials as $o)
|
||||||
<div class="item @if(! $c++) active @endif">
|
<div class="item @if(! $c++) active @endif">
|
||||||
<blockquote><p>{{ $o['quote'] }}</p></blockquote>
|
<blockquote><p>{{ $o['quote'] }}</p></blockquote>
|
||||||
<div class="carousel-info">
|
<div class="carousel-info">
|
||||||
|
@ -1,31 +1,31 @@
|
|||||||
@component('mail::layout')
|
@component('mail::layout')
|
||||||
{{-- Header --}}
|
{{-- Header --}}
|
||||||
@slot('header')
|
@slot('header')
|
||||||
@component('mail::header',['site'=>$site])
|
@component('mail::header',['site'=>$site])
|
||||||
{{ $heading }}
|
{{ $heading }}
|
||||||
@endcomponent
|
@endcomponent
|
||||||
@endslot
|
@endslot
|
||||||
|
|
||||||
{{-- Body --}}
|
{{-- Body --}}
|
||||||
{{ $slot }}
|
{{ $slot }}
|
||||||
|
|
||||||
{{-- Subcopy --}}
|
{{-- Subcopy --}}
|
||||||
@isset($subcopy)
|
@isset($subcopy)
|
||||||
@slot('subcopy')
|
@slot('subcopy')
|
||||||
@component('mail::subcopy')
|
@component('mail::subcopy')
|
||||||
{{ $subcopy }}
|
{{ $subcopy }}
|
||||||
@endcomponent
|
@endcomponent
|
||||||
@endslot
|
@endslot
|
||||||
@endisset
|
@endisset
|
||||||
|
|
||||||
{{-- Footer --}}
|
{{-- Footer --}}
|
||||||
@slot('footer')
|
@slot('footer')
|
||||||
@component('mail::footer')
|
@component('mail::footer')
|
||||||
<div class="fixedw" style="text-align: right; font-size: 0.8em;">
|
<div class="fixedw" style="text-align: right; font-size: 0.8em;">
|
||||||
{{ config('mail.from.name') }}<br>
|
{{ config('mail.from.name') }}<br>
|
||||||
{!! $site->address('html') !!}<br>
|
{!! join('<br>',$site->address) !!}<br>
|
||||||
{{ $site->site_email }}
|
{{ $site->site_email }}
|
||||||
</div>
|
</div>
|
||||||
@endcomponent
|
@endcomponent
|
||||||
@endslot
|
@endslot
|
||||||
@endcomponent
|
@endcomponent
|
@ -4,6 +4,7 @@ use App\Http\Controllers\{AdminController,
|
|||||||
Auth\LoginController,
|
Auth\LoginController,
|
||||||
CheckoutController,
|
CheckoutController,
|
||||||
HomeController,
|
HomeController,
|
||||||
|
MediaController,
|
||||||
PaypalController,
|
PaypalController,
|
||||||
WelcomeController};
|
WelcomeController};
|
||||||
|
|
||||||
@ -29,7 +30,7 @@ Route::group(['middleware'=>['theme:adminlte-be']],function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Generic Image Renderer - Render images that we dont have with a generic image
|
// Generic Image Renderer - Render images that we dont have with a generic image
|
||||||
Route::get('image/generic/{width}/{height}/{color}/{name?}','MediaController@image')->name('image');
|
Route::get('image/generic/{width}/{height}/{color}/{name?}',[MediaController::class,'image'])->name('image');
|
||||||
|
|
||||||
// Our Admin Routes
|
// Our Admin Routes
|
||||||
Route::group(['middleware'=>['theme:adminlte-be','auth','role:wholesaler'],'prefix'=>'a'],function() {
|
Route::group(['middleware'=>['theme:adminlte-be','auth','role:wholesaler'],'prefix'=>'a'],function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user