added live preview

pull/44/head
A1Gard 4 months ago
parent 2a1e43bc25
commit 91c22e0046

@ -454,7 +454,7 @@ function getAction($act)
} }
/** /**
* ge all admin routes array * get all admin routes array
* @return array * @return array
*/ */
function getAdminRoutes() function getAdminRoutes()
@ -471,6 +471,24 @@ function getAdminRoutes()
return $routes; return $routes;
} }
/**
* get all client routes array
* @return array
*/
function getClientRoutes()
{
$routes = [];
foreach (Illuminate\Support\Facades\Route::getRoutes() as $r) {
if (strpos($r->getName(), 'admin') === false) {
$routes[] = [
'name' => $r->getName(),
'url' => $r->uri(),
];
}
}
return $routes;
}
/** /**

@ -3,27 +3,36 @@
namespace App\Http\Controllers\Admin; namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use App\Models\Area;
use App\Models\Gfx; use App\Models\Gfx;
use Illuminate\Http\Request; use Illuminate\Http\Request;
class GfxController extends Controller class GfxController extends Controller
{ {
// //
public function index(){ public function index()
return view('admin.commons.gfx'); {
$prviews = Area::whereNotNull('preview')
->pluck('preview', 'name')->toArray();
array_walk($prviews, function ($value, $key) use (&$prviews) {
$prviews[$key] = route($value);
});
return view('admin.commons.gfx',compact('prviews'));
} }
public function update( Request $request){ public function update(Request $request)
{
foreach ($request->input('gfx',[]) as $key => $gfx){ foreach ($request->input('gfx', []) as $key => $gfx) {
$g = Gfx::where('key',$key)->first(); $g = Gfx::where('key', $key)->first();
if ($g != null){ if ($g != null) {
$g->value = $gfx; $g->value = $gfx;
$g->save(); $g->save();
} }
} }
logAdmin(__METHOD__,__CLASS__,null); logAdmin(__METHOD__, __CLASS__, null);
\Artisan::call('client'); \Artisan::call('client');
return redirect()->back()->with(['message' => __('GFX of website updated')]); return redirect()->back()->with(['message' => __('GFX of website updated')]);
} }

@ -35,6 +35,16 @@ class AreaSeeder extends Seeder
'preview' => 'welcome', 'preview' => 'welcome',
'icon' => 'ri-layout-top-2-line', 'icon' => 'ri-layout-top-2-line',
], ],
[
'name' => 'post',
'valid_segments' => json_encode(
["top","header","footer","menu",
"parallax","other","post"]
),
'max' => 6,
'preview' => 'test',
'icon' => 'ri-layout-top-2-line',
],
]; ];
foreach ($areas as $area){ foreach ($areas as $area){
$a = new Area(); $a = new Area();

@ -7,7 +7,7 @@
<i class="ri-brush-2-line"></i> <i class="ri-brush-2-line"></i>
GFX GFX
</h3> </h3>
<template v-for="(v,i) in values" > <template v-for="(v,i) in values">
<div v-if="v != undefined" class="p-2 item-gfx"> <div v-if="v != undefined" class="p-2 item-gfx">
<div class="float-end" <div class="float-end"
v-if="i == 'background' || i == 'primary' || i == 'secondary' || i == 'text'"> v-if="i == 'background' || i == 'primary' || i == 'secondary' || i == 'text'">
@ -38,90 +38,104 @@
<input :name="'gfx['+i+']'" :type="_dbg_" :value="v"> <input :name="'gfx['+i+']'" :type="_dbg_" :value="v">
</div> </div>
</template> </template>
<div class="p-2">
<select v-model="device" class="form-control">
<option value="desktop"> Desktop</option>
<option value="mobile"> Mobile</option>
</select>
</div>
</div> </div>
</div> </div>
<div class="col-xl-9"> <div class="col-xl-9">
<div class="item-gfx p-2 mb-2">
<div class="row">
<div class="col-md">
Device
<select v-model="device" class="form-control">
<option value="desktop"> Desktop</option>
<option value="mobile"> Mobile</option>
</select>
</div>
<div class="col-md">
Preview
<select v-model="preview" class="form-control">
<option :value="k" v-for="(k,p) in previews"> {{ p }}</option>
</select>
</div>
</div>
</div>
<div id="browser" :style="generalStyle" v-if="device != 'mobile'"> <div id="browser" :style="generalStyle" v-if="device != 'mobile'">
<div id="bar"> <div id="bar">
Browser Browser
</div> </div>
<div id="b-content"> <div id="b-content">
<div :class="values.container">
<div class="row" id="items-icon">
<div class="col-md-4">
<i class="ri-twitter-line"
:style="`color: ${values.primary};`"></i>
<h3 :style="`color: ${values.secondary};`">
Social media
</h3>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. A aperiam doloremque
eligendi reprehenderit voluptas? Ab amet autem doloremque, eius et harum magnam
maxime minima odio pariatur quaerat soluta temporibus velit.
</p>
<a class="btn-read-more"
:style="`box-shadow: ${values.shadow} ;
border-radius: ${values['border-radius']} ;
border-color: ${values.primary};
color: ${values.primary};`">
Read more
</a>
</div>
<div class="col-md-4">
<i class="ri-mail-line"
:style="`color: ${values.primary};`"></i>
<h3 :style="`color: ${values.secondary};`">
Contact
</h3>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. A aperiam doloremque
eligendi reprehenderit voluptas? Ab amet autem doloremque, eius et harum magnam
maxime minima odio pariatur quaerat soluta temporibus velit.
</p>
<a class="btn-read-more"
:style="`box-shadow: ${values.shadow} ;
border-radius: ${values['border-radius']} ;
border-color: ${values.primary};
color: ${values.primary};`">
Read more
</a>
</div>
<div class="col-md-4">
<i class="ri-brush-4-line"
:style="`color: ${values.primary};`"></i>
<h3 :style="`color: ${values.secondary};`">
Design
</h3>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. A aperiam doloremque
eligendi reprehenderit voluptas? Ab amet autem doloremque, eius et harum magnam
maxime minima odio pariatur quaerat soluta temporibus velit.
</p>
<a class="btn-read-more"
:style="`box-shadow: ${values.shadow} ;
border-radius: ${values['border-radius']} ;
border-color: ${values.primary};
color: ${values.primary};`">
Read more
</a>
</div>
</div>
<div id="big-box" :style="`box-shadow: ${values.shadow} ; <iframe :src="preview" class="preview-frame"></iframe>
border-radius: ${values['border-radius']} ; <!-- <div :class="values.container">-->
background: linear-gradient(49deg, ${values.primary} 42%, ${values.secondary} 100%);`"> <!-- <div class="row" id="items-icon">-->
<h3 class="diff"> <!-- <div class="col-md-4">-->
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Cupiditate iste ut <!-- <i class="ri-twitter-line"-->
veritatis? <!-- :style="`color: ${values.primary};`"></i>-->
</h3> <!-- <h3 :style="`color: ${values.secondary};`">-->
</div> <!-- Social media-->
</div> <!-- </h3>-->
<!-- <p>-->
<!-- Lorem ipsum dolor sit amet, consectetur adipisicing elit. A aperiam doloremque-->
<!-- eligendi reprehenderit voluptas? Ab amet autem doloremque, eius et harum magnam-->
<!-- maxime minima odio pariatur quaerat soluta temporibus velit.-->
<!-- </p>-->
<!-- <a class="btn-read-more"-->
<!-- :style="`box-shadow: ${values.shadow} ;-->
<!-- border-radius: ${values['border-radius']} ;-->
<!-- border-color: ${values.primary};-->
<!-- color: ${values.primary};`">-->
<!-- Read more-->
<!-- </a>-->
<!-- </div>-->
<!-- <div class="col-md-4">-->
<!-- <i class="ri-mail-line"-->
<!-- :style="`color: ${values.primary};`"></i>-->
<!-- <h3 :style="`color: ${values.secondary};`">-->
<!-- Contact-->
<!-- </h3>-->
<!-- <p>-->
<!-- Lorem ipsum dolor sit amet, consectetur adipisicing elit. A aperiam doloremque-->
<!-- eligendi reprehenderit voluptas? Ab amet autem doloremque, eius et harum magnam-->
<!-- maxime minima odio pariatur quaerat soluta temporibus velit.-->
<!-- </p>-->
<!-- <a class="btn-read-more"-->
<!-- :style="`box-shadow: ${values.shadow} ;-->
<!-- border-radius: ${values['border-radius']} ;-->
<!-- border-color: ${values.primary};-->
<!-- color: ${values.primary};`">-->
<!-- Read more-->
<!-- </a>-->
<!-- </div>-->
<!-- <div class="col-md-4">-->
<!-- <i class="ri-brush-4-line"-->
<!-- :style="`color: ${values.primary};`"></i>-->
<!-- <h3 :style="`color: ${values.secondary};`">-->
<!-- Design-->
<!-- </h3>-->
<!-- <p>-->
<!-- Lorem ipsum dolor sit amet, consectetur adipisicing elit. A aperiam doloremque-->
<!-- eligendi reprehenderit voluptas? Ab amet autem doloremque, eius et harum magnam-->
<!-- maxime minima odio pariatur quaerat soluta temporibus velit.-->
<!-- </p>-->
<!-- <a class="btn-read-more"-->
<!-- :style="`box-shadow: ${values.shadow} ;-->
<!-- border-radius: ${values['border-radius']} ;-->
<!-- border-color: ${values.primary};-->
<!-- color: ${values.primary};`">-->
<!-- Read more-->
<!-- </a>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div id="big-box" :style="`box-shadow: ${values.shadow} ;-->
<!-- border-radius: ${values['border-radius']} ;-->
<!-- background: linear-gradient(49deg, ${values.primary} 42%, ${values.secondary} 100%);`">-->
<!-- <h3 class="diff">-->
<!-- Lorem ipsum dolor sit amet, consectetur adipisicing elit. Cupiditate iste ut-->
<!-- veritatis?-->
<!-- </h3>-->
<!-- </div>-->
<!-- </div>-->
</div> </div>
</div> </div>
<div id="mobile" :style="generalStyle" v-if="device == 'mobile'"> <div id="mobile" :style="generalStyle" v-if="device == 'mobile'">
@ -141,76 +155,77 @@
</div> </div>
</div> </div>
</div> </div>
<div id="m-content" :class="values.container"> <iframe :src="preview" class="preview-frame"></iframe>
<div class="row" id="items-icon"> <!-- <div id="m-content" :class="values.container">-->
<div class="col-md-12"> <!-- <div class="row" id="items-icon">-->
<i class="ri-twitter-line" <!-- <div class="col-md-12">-->
:style="`color: ${values.primary};`"></i> <!-- <i class="ri-twitter-line"-->
<h3 :style="`color: ${values.secondary};`"> <!-- :style="`color: ${values.primary};`"></i>-->
Social media <!-- <h3 :style="`color: ${values.secondary};`">-->
</h3> <!-- Social media-->
<p> <!-- </h3>-->
Lorem ipsum dolor sit amet, consectetur adipisicing elit. A aperiam doloremque <!-- <p>-->
eligendi reprehenderit voluptas? Ab amet autem doloremque, eius et harum magnam <!-- Lorem ipsum dolor sit amet, consectetur adipisicing elit. A aperiam doloremque-->
maxime minima odio pariatur quaerat soluta temporibus velit. <!-- eligendi reprehenderit voluptas? Ab amet autem doloremque, eius et harum magnam-->
</p> <!-- maxime minima odio pariatur quaerat soluta temporibus velit.-->
<a class="btn-read-more" <!-- </p>-->
:style="`box-shadow: ${values.shadow} ; <!-- <a class="btn-read-more"-->
border-radius: ${values['border-radius']} ; <!-- :style="`box-shadow: ${values.shadow} ;-->
border-color: ${values.primary}; <!-- border-radius: ${values['border-radius']} ;-->
color: ${values.primary};`"> <!-- border-color: ${values.primary};-->
Read more <!-- color: ${values.primary};`">-->
</a> <!-- Read more-->
</div> <!-- </a>-->
<div class="col-12"> <!-- </div>-->
<i class="ri-mail-line" <!-- <div class="col-12">-->
:style="`color: ${values.primary};`"></i> <!-- <i class="ri-mail-line"-->
<h3 :style="`color: ${values.secondary};`"> <!-- :style="`color: ${values.primary};`"></i>-->
Contact <!-- <h3 :style="`color: ${values.secondary};`">-->
</h3> <!-- Contact-->
<p> <!-- </h3>-->
Lorem ipsum dolor sit amet, consectetur adipisicing elit. A aperiam doloremque <!-- <p>-->
eligendi reprehenderit voluptas? Ab amet autem doloremque, eius et harum magnam <!-- Lorem ipsum dolor sit amet, consectetur adipisicing elit. A aperiam doloremque-->
maxime minima odio pariatur quaerat soluta temporibus velit. <!-- eligendi reprehenderit voluptas? Ab amet autem doloremque, eius et harum magnam-->
</p> <!-- maxime minima odio pariatur quaerat soluta temporibus velit.-->
<a class="btn-read-more" <!-- </p>-->
:style="`box-shadow: ${values.shadow} ; <!-- <a class="btn-read-more"-->
border-radius: ${values['border-radius']} ; <!-- :style="`box-shadow: ${values.shadow} ;-->
border-color: ${values.primary}; <!-- border-radius: ${values['border-radius']} ;-->
color: ${values.primary};`"> <!-- border-color: ${values.primary};-->
Read more <!-- color: ${values.primary};`">-->
</a> <!-- Read more-->
</div> <!-- </a>-->
<div class="col-12"> <!-- </div>-->
<i class="ri-brush-4-line" <!-- <div class="col-12">-->
:style="`color: ${values.primary};`"></i> <!-- <i class="ri-brush-4-line"-->
<h3 :style="`color: ${values.secondary};`"> <!-- :style="`color: ${values.primary};`"></i>-->
Design <!-- <h3 :style="`color: ${values.secondary};`">-->
</h3> <!-- Design-->
<p> <!-- </h3>-->
Lorem ipsum dolor sit amet, consectetur adipisicing elit. A aperiam doloremque <!-- <p>-->
eligendi reprehenderit voluptas? Ab amet autem doloremque, eius et harum magnam <!-- Lorem ipsum dolor sit amet, consectetur adipisicing elit. A aperiam doloremque-->
maxime minima odio pariatur quaerat soluta temporibus velit. <!-- eligendi reprehenderit voluptas? Ab amet autem doloremque, eius et harum magnam-->
</p> <!-- maxime minima odio pariatur quaerat soluta temporibus velit.-->
<a class="btn-read-more" <!-- </p>-->
:style="`box-shadow: ${values.shadow} ; <!-- <a class="btn-read-more"-->
border-radius: ${values['border-radius']} ; <!-- :style="`box-shadow: ${values.shadow} ;-->
border-color: ${values.primary}; <!-- border-radius: ${values['border-radius']} ;-->
color: ${values.primary};`"> <!-- border-color: ${values.primary};-->
Read more <!-- color: ${values.primary};`">-->
</a> <!-- Read more-->
</div> <!-- </a>-->
</div> <!-- </div>-->
<!-- </div>-->
<div id="big-box" :style="`box-shadow: ${values.shadow} ;
border-radius: ${values['border-radius']} ; <!-- <div id="big-box" :style="`box-shadow: ${values.shadow} ;-->
background: linear-gradient(49deg, ${values.primary} 42%, ${values.secondary} 100%);`"> <!-- border-radius: ${values['border-radius']} ;-->
<h3 style="filter: invert(1);mix-blend-mode: difference;"> <!-- background: linear-gradient(49deg, ${values.primary} 42%, ${values.secondary} 100%);`">-->
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Cupiditate iste ut <!-- <h3 style="filter: invert(1);mix-blend-mode: difference;">-->
veritatis? <!-- Lorem ipsum dolor sit amet, consectetur adipisicing elit. Cupiditate iste ut-->
</h3> <!-- veritatis?-->
</div> <!-- </h3>-->
</div> <!-- </div>-->
<!-- </div>-->
</div> </div>
</div> </div>
</div> </div>
@ -221,6 +236,11 @@
import BorderRadiosInput from "./BorderRadiosInput.vue"; import BorderRadiosInput from "./BorderRadiosInput.vue";
import ShadowInput from "./ShadowInput.vue"; import ShadowInput from "./ShadowInput.vue";
function iframeRef( frameRef ) {
return frameRef.contentWindow
? frameRef.contentWindow.document
: frameRef.contentDocument
}
export default { export default {
name: "gfxer", name: "gfxer",
@ -233,11 +253,18 @@ export default {
_dbg_: 'hidden', _dbg_: 'hidden',
values: {}, values: {},
titles: {}, titles: {},
preview: null,
device: 'desktop', // desktop device: 'desktop', // desktop
} }
}, },
props: { props: {
items: {}, items: {
required: true,
},
previews: {
default: [],
type: Array,
},
}, },
mounted() { mounted() {
for (const i in this.items) { for (const i in this.items) {
@ -245,8 +272,10 @@ export default {
this.titles[item.key] = item.label; this.titles[item.key] = item.label;
this.values[item.key] = item.value; this.values[item.key] = item.value;
} }
if (Object.keys(this.previews).length > 0) {
console.log(this.items); this.preview = Object.values(this.previews)[0];
console.log(this.preview, 'x');
}
}, },
computed: { computed: {
generalStyle() { // generalStyle() { //
@ -301,8 +330,48 @@ export default {
else if (g < 0) g = 0; else if (g < 0) g = 0;
return (usePound ? "#" : "") + (g | (b << 8) | (r << 16)).toString(16); return (usePound ? "#" : "") + (g | (b << 8) | (r << 16)).toString(16);
},
updateIframes(newVal){
document.querySelectorAll('.preview-frame').forEach( (preview) => {
let doc = iframeRef(preview);
let sty = doc.documentElement.style ;
sty.setProperty('--xshop-primary',newVal.primary);
sty.setProperty('--xshop-background',newVal.background);
sty.setProperty('--xshop-secondary',newVal.secondary);
sty.setProperty('--xshop-text',newVal.text);
sty.setProperty('--xshop-border-radius',newVal['border-radius']);
sty.setProperty('--xshop-shadow',newVal.shadow);
let newContainer = 'container';
let oldContainer = 'container-fluid';
if (newVal.container == 'container-fluid'){
newContainer = 'container-fluid';
oldContainer = 'container';
}
doc.querySelectorAll('.'+oldContainer).forEach(function (el) {
el.classList.remove(oldContainer);
el.classList.add(newContainer);
});
});
} }
} },
watch: {
values:{
handler (val) {
this.updateIframes(val);
},
deep: true
},
device(){
setTimeout( () => {
this.updateIframes(this.values);
},750);
},
preview(){
setTimeout( () => {
this.updateIframes(this.values);
},750);
}
},
} }
</script> </script>
@ -400,4 +469,9 @@ export default {
filter: invert(1); filter: invert(1);
mix-blend-mode: difference; mix-blend-mode: difference;
} }
.preview-frame {
height: 80vh;
width: 100%;
}
</style> </style>

@ -35,3 +35,23 @@ body{
margin: auto; margin: auto;
border-radius: 50%; border-radius: 50%;
} }
#do-edit{
position: fixed;
inset-inline-start: 0;
top: 5%;
background: #21252BFF;
color: white;
z-index: 999;
padding: 10px;
width: 50px;
opacity: .4;
transition: 1s;
&:hover{
opacity: 1;
}
i{
font-size: 25px;
}
}

@ -24,55 +24,55 @@ a,a:visited{
.btn{ .btn{
border-radius: $xshop-border-radius; border-radius: var(--xshop-border-radius);
} }
.btn-primary{ .btn-primary{
background: $xshop-primary; background: var(--xshop-primary);
border-color: lighten($xshop-primary,5); border-color: var(--xshop-secondary);
color: $xshop-diff !important; color: var(--xshop-diff) !important;
&:hover{ &:hover{
border-color: lighten($xshop-primary,10); border-color: var(--xshop-primary);
background: darken($xshop-primary,10); ; background: var(--xshop-secondary); ;
} }
} }
.btn-outline-primary{ .btn-outline-primary{
border-color: $xshop-primary; border-color: var(--xshop-primary);
color: $xshop-primary; color:var(--xshop-primary);
&:hover{ &:hover{
border-color: lighten($xshop-primary,10); border-color: var(--xshop-secondary);
color: $xshop-diff !important; color: var(--xshop-diff) !important;
background: darken($xshop-primary,10); ; background: var(--xshop-secondary); ;
} }
} }
.btn-secondary{ .btn-secondary{
background: $xshop-secondary; background: var(--xshop-secondary);
border-color: lighten($xshop-secondary,5); border-color: var(--xshop-secondary);
color: $xshop-diff !important; color: var(--xshop-diff) !important;
&:hover{ &:hover{
border-color: lighten($xshop-secondary,10); border-color: var(--xshop-primary);
background: darken($xshop-secondary,10); ; background: var(--xshop-secondary); ;
} }
} }
.btn-outline-secondary{ .btn-outline-secondary{
border-color: $xshop-secondary; border-color: var(--xshop-secondary);
color: $xshop-secondary; color: var(--xshop-secondary);
&:hover{ &:hover{
border-color: lighten($xshop-secondary,10); border-color: var(--xshop-primary);
color: $xshop-diff !important; color: var(--xshop-diff) !important;
background: darken($xshop-secondary,10); ; background: var(--xshop-primary); ;
} }
} }
.btn-outline-invert{ .btn-outline-invert{
border-color: $xshop-diff; border-color: var(--xshop-diff);
color: $xshop-diff; color: var(--xshop-diff);
&:hover{ &:hover{
background: $xshop-diff; background: var(--xshop-diff);
color: $xshop-primary; color: var(--xshop-primary);
} }
} }

@ -6,7 +6,10 @@
<form action="{{route('admin.gfx.update')}}" method="post" class="mb-5 pb-5"> <form action="{{route('admin.gfx.update')}}" method="post" class="mb-5 pb-5">
@csrf @csrf
@include('components.err') @include('components.err')
<gfxer :items='@json(\App\Models\Gfx::all('key','label','value'))'></gfxer> <gfxer
:items='@json(\App\Models\Gfx::all('key','label','value'))'
:previews='@json($prviews)'
></gfxer>
<button <button
data-link="{{getRoute('update')}}" data-link="{{getRoute('update')}}"
id="save-sort" id="save-sort"

@ -2,7 +2,7 @@
// scss // scss
i{ i{
font-size: 128px; font-size: 128px;
-webkit-text-stroke: 6px $xshop-background; -webkit-text-stroke: 6px var(--xshop-background);
} }
[class^="col-md"]{ [class^="col-md"]{

@ -1,7 +1,7 @@
.GradientTextLink { .GradientTextLink {
// scss // scss
background: linear-gradient( var(--deg), $xshop-primary, $xshop-secondary 100%); background: linear-gradient( var(--deg), var(--xshop-primary), var(--xshop-secondary) 100%);
color: $xshop-diff; color: var(--xshop-diff);
h1{ h1{
font-size: 24px; font-size: 24px;

@ -1,8 +1,8 @@
.SimpleTextLink { .SimpleTextLink {
// scss // scss
background: $xshop-primary; background: var(--xshop-primary);
color: $xshop-diff; color:var(--xshop-diff);
h1{ h1{
font-size: 24px; font-size: 24px;

@ -3,7 +3,7 @@
h1{ h1{
a{ a{
color: $xshop-text ; color: var(--xshop-text) ;
} }
} }
.row{ .row{

@ -1,4 +1,10 @@
@yield('custom-foot') @yield('custom-foot')
<input type="hidden" id="api-display-url" value="{{route('v1.visitor.display')}}"> <input type="hidden" id="api-display-url" value="{{route('v1.visitor.display')}}">
@if(auth()->check() && auth()->user()->hasRole('developer') && !request()->has('ediable'))
<a id="do-edit" href="?ediable">
<i class="ri-settings-2-line"></i>
</a>
@endif
</body> </body>
</html> </html>

@ -4,7 +4,7 @@
welcome welcome
@endsection @endsection
@section('content') @section('content')
@foreach(getParts('index') as $part) @foreach(getParts($area) as $part)
@php($p = $part->getBladeWithData()) @php($p = $part->getBladeWithData())
@include($p['blade'],['data' => $p['data']]) @include($p['blade'],['data' => $p['data']])
@endforeach @endforeach

@ -4,7 +4,8 @@ use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Route; use Illuminate\Support\Facades\Route;
Route::get('/', function () { Route::get('/', function () {
return view('welcome'); $area = 'index';
return view('welcome',compact('area'));
})->name('welcome')->middleware(\App\Http\Middleware\VisitorCounter::class); })->name('welcome')->middleware(\App\Http\Middleware\VisitorCounter::class);
Auth::routes(['register' => false]); Auth::routes(['register' => false]);
@ -342,7 +343,7 @@ Route::get('test',function (){
// return \Resources\Views\Segments\PreloaderCircle::onAdd(); // return \Resources\Views\Segments\PreloaderCircle::onAdd();
return \App\Helpers\TVisitor::GetKeyword(); return \App\Helpers\TVisitor::GetKeyword();
}); })->name('test');

Loading…
Cancel
Save