Update (major): Add search engine submission button

This commit is contained in:
2023-08-02 00:04:44 +08:00
parent f25fea8d68
commit 592637b0b3
31 changed files with 1346 additions and 75 deletions

View File

@@ -71,3 +71,4 @@ LOCATION_TESTING=false
DEV_DEFAULT_LOCATION=MY
DEV_DEFAULT_IP=202.188.193.93
INDEXNOW_KEY=xxxxxxxx-xxxx-xxxxx-xxxx-xxxxxxxxxx

View File

@@ -6,6 +6,8 @@
use App\Models\Post;
use App\Models\PostCategory;
use Illuminate\Http\Request;
use LaravelFreelancerNL\LaravelIndexNow\Facades\IndexNow;
use LaravelGoogleIndexing;
class PostController extends Controller
{
@@ -35,6 +37,24 @@ public function edit(Request $request, $post_id)
return redirect()->back()->with('error', 'Post does not exist.');
}
public function indexing(Request $request, $post_id)
{
$post = Post::find($post_id);
if (! is_null($post)) {
$post_url = route('home.country.post', ['country' => $post->post_category?->category?->country_locale_slug, 'post_slug' => $post->slug]);
LaravelGoogleIndexing::create()->update($post_url);
IndexNow::submit($post_url);
return redirect()->back()->with('success', 'Signalled Google for Indexing.');
}
return redirect()->back()->with('error', 'Something went wrong.');
}
public function postUpsert(Request $request)
{

View File

@@ -13,11 +13,13 @@
"appstract/laravel-opcache": "^4.0",
"artesaos/seotools": "^1.2",
"codex-team/editor.js": "^2.0",
"famdirksen/laravel-google-indexing": "^0.5.0",
"genealabs/laravel-model-caching": "^0.13.4",
"glhd/laravel-timezone-mapper": "^1.4",
"guzzlehttp/guzzle": "^7.2",
"intervention/image": "^2.7",
"kalnoy/nestedset": "^6.0",
"laravel-freelancer-nl/laravel-index-now": "^1.2",
"laravel/framework": "^10.10",
"laravel/sanctum": "^3.2",
"laravel/tinker": "^2.8",

1294
composer.lock generated

File diff suppressed because it is too large Load Diff

13
config/index-now.php Normal file
View File

@@ -0,0 +1,13 @@
<?php
declare(strict_types=1);
return [
'delay' => env('INDEXNOW_SUBMIT_DELAY', 600),
'host' => env('APP_URL', 'localhost'),
'key' => env('INDEXNOW_KEY', ''),
'key-location' => env('INDEXNOW_KEY_LOCATION', ''),
'log-failed-submits' => env('INDEXNOW_LOG_FAILED_SUBMITS', true),
'production-env' => env('INDEXNOW_PRODUCTION_ENV', 'production'),
'search-engine' => env('INDEXNOW_SEARCH_ENGINE', 'api.indexnow.org'),
];

View File

@@ -0,0 +1,11 @@
<?php
return [
'google' => [
'auth_config' => storage_path('google_auth_config_indexing.json'),
'scopes' => [
\Google_Service_Indexing::INDEXING,
],
],
];

Binary file not shown.

View File

@@ -1,4 +1,4 @@
import Qn from"./VueEditorJs-d25d3072.js";import{r as Ft,_ as Mr}from"./NativeImageBlock-c80786a0.js";import{L as mn}from"./bundle-a2237f43.js";import{H as hn}from"./bundle-0252d10e.js";import{g as Cr,d as Pr,a as ua,r as zt,b as ne,c as vt,u as an,t as da,o as ct,e as nn,w as Nt,f as Z,h as R,i as Q,j as bt,k as nt,l as Fe,m as _e,n as ie,p as ze,q as ft,s as j,v as Qe,x as yn,y as Pe,z as G,A as Gn,T as Sr,B as Ce,C as he,D as K,E as rt,F as we,G as It,H as lt,I as Ve,J as Zt,K as $t,L as Mt,M as wa,N as Or,O as Nr,P as $r,_ as Ar,Q as Ir,R as Er,S as Yr,U as gn,V as Ur,W as Lr,X as wn}from"./admin-app-4cec6240.js";import"./index-8746c87e.js";var Xn={exports:{}};/*!
import Qn from"./VueEditorJs-d588a788.js";import{r as Ft,_ as Mr}from"./NativeImageBlock-f0434154.js";import{L as mn}from"./bundle-57d1f9b0.js";import{H as hn}from"./bundle-7a808777.js";import{g as Cr,d as Pr,a as ua,r as zt,b as ne,c as vt,u as an,t as da,o as ct,e as nn,w as Nt,f as Z,h as R,i as Q,j as bt,k as nt,l as Fe,m as _e,n as ie,p as ze,q as ft,s as j,v as Qe,x as yn,y as Pe,z as G,A as Gn,T as Sr,B as Ce,C as he,D as K,E as rt,F as we,G as It,H as lt,I as Ve,J as Zt,K as $t,L as Mt,M as wa,N as Or,O as Nr,P as $r,_ as Ar,Q as Ir,R as Er,S as Yr,U as gn,V as Ur,W as Lr,X as wn}from"./admin-app-98ae3828.js";import"./index-8746c87e.js";var Xn={exports:{}};/*!
* Image tool
*
* @version 2.8.1

Binary file not shown.

View File

@@ -1,4 +1,4 @@
import{_ as Le,a0 as Zt,c as Oe,i as Ne,r as Re,o as De,h as Pe}from"./admin-app-4cec6240.js";import"./index-8746c87e.js";var Fe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function xt(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function St(){}Object.assign(St,{default:St,register:St,revert:function(){},__esModule:!0});Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(s){const t=(this.document||this.ownerDocument).querySelectorAll(s);let e=t.length;for(;--e>=0&&t.item(e)!==this;);return e>-1});Element.prototype.closest||(Element.prototype.closest=function(s){let t=this;if(!document.documentElement.contains(t))return null;do{if(t.matches(s))return t;t=t.parentElement||t.parentNode}while(t!==null);return null});Element.prototype.prepend||(Element.prototype.prepend=function(s){const t=document.createDocumentFragment();Array.isArray(s)||(s=[s]),s.forEach(e=>{const o=e instanceof Node;t.appendChild(o?e:document.createTextNode(e))}),this.insertBefore(t,this.firstChild)});Element.prototype.scrollIntoViewIfNeeded||(Element.prototype.scrollIntoViewIfNeeded=function(s){s=arguments.length===0?!0:!!s;const t=this.parentNode,e=window.getComputedStyle(t,null),o=parseInt(e.getPropertyValue("border-top-width")),i=parseInt(e.getPropertyValue("border-left-width")),n=this.offsetTop-t.offsetTop<t.scrollTop,r=this.offsetTop-t.offsetTop+this.clientHeight-o>t.scrollTop+t.clientHeight,a=this.offsetLeft-t.offsetLeft<t.scrollLeft,l=this.offsetLeft-t.offsetLeft+this.clientWidth-i>t.scrollLeft+t.clientWidth,c=n&&!r;(n||r)&&s&&(t.scrollTop=this.offsetTop-t.offsetTop-t.clientHeight/2-o+this.clientHeight/2),(a||l)&&s&&(t.scrollLeft=this.offsetLeft-t.offsetLeft-t.clientWidth/2-i+this.clientWidth/2),(n||r||a||l)&&!s&&this.scrollIntoView(c)});let He=(s=21)=>crypto.getRandomValues(new Uint8Array(s)).reduce((t,e)=>(e&=63,e<36?t+=e.toString(36):e<62?t+=(e-26).toString(36).toUpperCase():e>62?t+="-":t+="_",t),"");var oe=(s=>(s.VERBOSE="VERBOSE",s.INFO="INFO",s.WARN="WARN",s.ERROR="ERROR",s))(oe||{});const E={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,LEFT:37,UP:38,DOWN:40,RIGHT:39,DELETE:46,META:91},je={LEFT:0,WHEEL:1,RIGHT:2,BACKWARD:3,FORWARD:4};function gt(s,t,e="log",o,i="color: inherit"){if(!("console"in window)||!window.console[e])return;const n=["info","log","warn","error"].includes(e),r=[];switch(gt.logLevel){case"ERROR":if(e!=="error")return;break;case"WARN":if(!["error","warn"].includes(e))return;break;case"INFO":if(!n||s)return;break}o&&r.push(o);const a="Editor.js 2.27.2",l=`line-height: 1em;
import{_ as Le,a0 as Zt,c as Oe,i as Ne,r as Re,o as De,h as Pe}from"./admin-app-98ae3828.js";import"./index-8746c87e.js";var Fe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function xt(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function St(){}Object.assign(St,{default:St,register:St,revert:function(){},__esModule:!0});Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(s){const t=(this.document||this.ownerDocument).querySelectorAll(s);let e=t.length;for(;--e>=0&&t.item(e)!==this;);return e>-1});Element.prototype.closest||(Element.prototype.closest=function(s){let t=this;if(!document.documentElement.contains(t))return null;do{if(t.matches(s))return t;t=t.parentElement||t.parentNode}while(t!==null);return null});Element.prototype.prepend||(Element.prototype.prepend=function(s){const t=document.createDocumentFragment();Array.isArray(s)||(s=[s]),s.forEach(e=>{const o=e instanceof Node;t.appendChild(o?e:document.createTextNode(e))}),this.insertBefore(t,this.firstChild)});Element.prototype.scrollIntoViewIfNeeded||(Element.prototype.scrollIntoViewIfNeeded=function(s){s=arguments.length===0?!0:!!s;const t=this.parentNode,e=window.getComputedStyle(t,null),o=parseInt(e.getPropertyValue("border-top-width")),i=parseInt(e.getPropertyValue("border-left-width")),n=this.offsetTop-t.offsetTop<t.scrollTop,r=this.offsetTop-t.offsetTop+this.clientHeight-o>t.scrollTop+t.clientHeight,a=this.offsetLeft-t.offsetLeft<t.scrollLeft,l=this.offsetLeft-t.offsetLeft+this.clientWidth-i>t.scrollLeft+t.clientWidth,c=n&&!r;(n||r)&&s&&(t.scrollTop=this.offsetTop-t.offsetTop-t.clientHeight/2-o+this.clientHeight/2),(a||l)&&s&&(t.scrollLeft=this.offsetLeft-t.offsetLeft-t.clientWidth/2-i+this.clientWidth/2),(n||r||a||l)&&!s&&this.scrollIntoView(c)});let He=(s=21)=>crypto.getRandomValues(new Uint8Array(s)).reduce((t,e)=>(e&=63,e<36?t+=e.toString(36):e<62?t+=(e-26).toString(36).toUpperCase():e>62?t+="-":t+="_",t),"");var oe=(s=>(s.VERBOSE="VERBOSE",s.INFO="INFO",s.WARN="WARN",s.ERROR="ERROR",s))(oe||{});const E={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,LEFT:37,UP:38,DOWN:40,RIGHT:39,DELETE:46,META:91},je={LEFT:0,WHEEL:1,RIGHT:2,BACKWARD:3,FORWARD:4};function gt(s,t,e="log",o,i="color: inherit"){if(!("console"in window)||!window.console[e])return;const n=["info","log","warn","error"].includes(e),r=[];switch(gt.logLevel){case"ERROR":if(e!=="error")return;break;case"WARN":if(!["error","warn"].includes(e))return;break;case"INFO":if(!n||s)return;break}o&&r.push(o);const a="Editor.js 2.27.2",l=`line-height: 1em;
color: #006FEA;
display: inline-block;
font-size: 11px;
@@ -80,4 +80,4 @@ import{_ as Le,a0 as Zt,c as Oe,i as Ne,r as Re,o as De,h as Pe}from"./admin-app
* @license Apache-2.0
* @see Editor.js <https://editorjs.io>
* @author CodeX Team <https://codex.so>
*/class yi{static get version(){return"2.27.2"}constructor(t){let e=()=>{};z(t)&&D(t.onReady)&&(e=t.onReady);const o=new wi(t);this.isReady=o.isReady.then(()=>{this.exportAPI(o),e()})}exportAPI(t){const e=["configuration"],o=()=>{Object.values(t.moduleInstances).forEach(i=>{D(i.destroy)&&i.destroy(),i.listeners.removeAll()}),t=null;for(const i in this)Object.prototype.hasOwnProperty.call(this,i)&&delete this[i];Object.setPrototypeOf(this,null)};e.forEach(i=>{this[i]=t[i]}),this.destroy=o,Object.setPrototypeOf(this,t.moduleInstances.API.methods),delete this.exportAPI,Object.entries({blocks:{clear:"clear",render:"render"},caret:{focus:"focus"},events:{on:"on",off:"off",emit:"emit"},saver:{save:"save"}}).forEach(([i,n])=>{Object.entries(n).forEach(([r,a])=>{this[a]=t.moduleInstances.API.methods[i][r]})})}}const Tt={header:Zt(()=>import("./bundle-0252d10e.js").then(s=>s.b),["assets/bundle-0252d10e.js","assets/admin-app-4cec6240.js","assets/index-8746c87e.js","assets/admin-app-935fc652.css"]),list:Zt(()=>import("./bundle-a2237f43.js").then(s=>s.b),["assets/bundle-a2237f43.js","assets/admin-app-4cec6240.js","assets/index-8746c87e.js","assets/admin-app-935fc652.css"])},Ei=Oe({name:"vue-editor-js",props:{holder:{type:String,default:()=>"vue-editor-js",require:!0},config:{type:Object,default:()=>({}),require:!0},initialized:{type:Function,default:()=>{}}},setup:(s,t)=>{const e=Re({editor:null});function o(r){i(),e.editor=new yi({holder:r.holder||"vue-editor-js",...r.config,onChange:(a,l)=>{n()}}),r.initialized(e.editor)}function i(){e.editor&&(e.editor.destroy(),e.editor=null)}function n(){console.log("saveEditor"),e.editor&&e.editor.save().then(r=>{console.log(r),t.emit("saved",r)})}return De(r=>o(s)),{props:s,state:e}},methods:{useTools(s,t){const e=Object.keys(Tt),o={...s.customTools};return e.every(i=>!s[i])?(e.forEach(i=>o[i]={class:Tt[i]}),Object.keys(t).forEach(i=>{o[i]!==void 0&&o[i]!==null&&(o[i].config=t[i])}),o):(e.forEach(i=>{const n=s[i];if(n&&(o[i]={class:Tt[i]},typeof n=="object")){const r=Object.assign({},s[i]);delete r.class,o[i]=Object.assign(o[i],r)}}),Object.keys(t).forEach(i=>{o[i]!==void 0&&o[i]!==null&&(o[i].config=t[i])}),o)}}}),Si=["id"];function Ci(s,t,e,o,i,n){return Pe(),Ne("div",{id:s.holder},null,8,Si)}const Ii=Le(Ei,[["render",Ci]]);export{Tt as PLUGINS,Ii as default};
*/class yi{static get version(){return"2.27.2"}constructor(t){let e=()=>{};z(t)&&D(t.onReady)&&(e=t.onReady);const o=new wi(t);this.isReady=o.isReady.then(()=>{this.exportAPI(o),e()})}exportAPI(t){const e=["configuration"],o=()=>{Object.values(t.moduleInstances).forEach(i=>{D(i.destroy)&&i.destroy(),i.listeners.removeAll()}),t=null;for(const i in this)Object.prototype.hasOwnProperty.call(this,i)&&delete this[i];Object.setPrototypeOf(this,null)};e.forEach(i=>{this[i]=t[i]}),this.destroy=o,Object.setPrototypeOf(this,t.moduleInstances.API.methods),delete this.exportAPI,Object.entries({blocks:{clear:"clear",render:"render"},caret:{focus:"focus"},events:{on:"on",off:"off",emit:"emit"},saver:{save:"save"}}).forEach(([i,n])=>{Object.entries(n).forEach(([r,a])=>{this[a]=t.moduleInstances.API.methods[i][r]})})}}const Tt={header:Zt(()=>import("./bundle-7a808777.js").then(s=>s.b),["assets/bundle-7a808777.js","assets/admin-app-98ae3828.js","assets/index-8746c87e.js","assets/admin-app-935fc652.css"]),list:Zt(()=>import("./bundle-57d1f9b0.js").then(s=>s.b),["assets/bundle-57d1f9b0.js","assets/admin-app-98ae3828.js","assets/index-8746c87e.js","assets/admin-app-935fc652.css"])},Ei=Oe({name:"vue-editor-js",props:{holder:{type:String,default:()=>"vue-editor-js",require:!0},config:{type:Object,default:()=>({}),require:!0},initialized:{type:Function,default:()=>{}}},setup:(s,t)=>{const e=Re({editor:null});function o(r){i(),e.editor=new yi({holder:r.holder||"vue-editor-js",...r.config,onChange:(a,l)=>{n()}}),r.initialized(e.editor)}function i(){e.editor&&(e.editor.destroy(),e.editor=null)}function n(){console.log("saveEditor"),e.editor&&e.editor.save().then(r=>{console.log(r),t.emit("saved",r)})}return De(r=>o(s)),{props:s,state:e}},methods:{useTools(s,t){const e=Object.keys(Tt),o={...s.customTools};return e.every(i=>!s[i])?(e.forEach(i=>o[i]={class:Tt[i]}),Object.keys(t).forEach(i=>{o[i]!==void 0&&o[i]!==null&&(o[i].config=t[i])}),o):(e.forEach(i=>{const n=s[i];if(n&&(o[i]={class:Tt[i]},typeof n=="object")){const r=Object.assign({},s[i]);delete r.class,o[i]=Object.assign(o[i],r)}}),Object.keys(t).forEach(i=>{o[i]!==void 0&&o[i]!==null&&(o[i].config=t[i])}),o)}}}),Si=["id"];function Ci(s,t,e,o,i,n){return Pe(),Ne("div",{id:s.holder},null,8,Si)}const Ii=Le(Ei,[["render",Ci]]);export{Tt as PLUGINS,Ii as default};

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@@ -1,4 +1,4 @@
import{g as E}from"./admin-app-4cec6240.js";function P(_,j){for(var v=0;v<j.length;v++){const p=j[v];if(typeof p!="string"&&!Array.isArray(p)){for(const c in p)if(c!=="default"&&!(c in _)){const o=Object.getOwnPropertyDescriptor(p,c);o&&Object.defineProperty(_,c,o.get?o:{enumerable:!0,get:()=>p[c]})}}}return Object.freeze(Object.defineProperty(_,Symbol.toStringTag,{value:"Module"}))}var T={exports:{}};(function(_,j){(function(v,p){_.exports=p()})(window,function(){return function(v){var p={};function c(o){if(p[o])return p[o].exports;var l=p[o]={i:o,l:!1,exports:{}};return v[o].call(l.exports,l,l.exports,c),l.l=!0,l.exports}return c.m=v,c.c=p,c.d=function(o,l,d){c.o(o,l)||Object.defineProperty(o,l,{enumerable:!0,get:d})},c.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},c.t=function(o,l){if(1&l&&(o=c(o)),8&l||4&l&&typeof o=="object"&&o&&o.__esModule)return o;var d=Object.create(null);if(c.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:o}),2&l&&typeof o!="string")for(var f in o)c.d(d,f,(function(b){return o[b]}).bind(null,f));return d},c.n=function(o){var l=o&&o.__esModule?function(){return o.default}:function(){return o};return c.d(l,"a",l),l},c.o=function(o,l){return Object.prototype.hasOwnProperty.call(o,l)},c.p="/",c(c.s=4)}([function(v,p,c){var o=c(1),l=c(2);typeof(l=l.__esModule?l.default:l)=="string"&&(l=[[v.i,l,""]]);var d={insert:"head",singleton:!1};o(l,d),v.exports=l.locals||{}},function(v,p,c){var o,l=function(){return o===void 0&&(o=!!(window&&document&&document.all&&!window.atob)),o},d=function(){var r={};return function(i){if(r[i]===void 0){var s=document.querySelector(i);if(window.HTMLIFrameElement&&s instanceof window.HTMLIFrameElement)try{s=s.contentDocument.head}catch{s=null}r[i]=s}return r[i]}}(),f=[];function b(r){for(var i=-1,s=0;s<f.length;s++)if(f[s].identifier===r){i=s;break}return i}function S(r,i){for(var s={},u=[],m=0;m<r.length;m++){var g=r[m],y=i.base?g[0]+i.base:g[0],C=s[y]||0,O="".concat(y," ").concat(C);s[y]=C+1;var L=b(O),M={css:g[1],media:g[2],sourceMap:g[3]};L!==-1?(f[L].references++,f[L].updater(M)):f.push({identifier:O,updater:h(M,i),references:1}),u.push(O)}return u}function k(r){var i=document.createElement("style"),s=r.attributes||{};if(s.nonce===void 0){var u=c.nc;u&&(s.nonce=u)}if(Object.keys(s).forEach(function(g){i.setAttribute(g,s[g])}),typeof r.insert=="function")r.insert(i);else{var m=d(r.insert||"head");if(!m)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");m.appendChild(i)}return i}var w,x=(w=[],function(r,i){return w[r]=i,w.filter(Boolean).join(`
import{g as E}from"./admin-app-98ae3828.js";function P(_,j){for(var v=0;v<j.length;v++){const p=j[v];if(typeof p!="string"&&!Array.isArray(p)){for(const c in p)if(c!=="default"&&!(c in _)){const o=Object.getOwnPropertyDescriptor(p,c);o&&Object.defineProperty(_,c,o.get?o:{enumerable:!0,get:()=>p[c]})}}}return Object.freeze(Object.defineProperty(_,Symbol.toStringTag,{value:"Module"}))}var T={exports:{}};(function(_,j){(function(v,p){_.exports=p()})(window,function(){return function(v){var p={};function c(o){if(p[o])return p[o].exports;var l=p[o]={i:o,l:!1,exports:{}};return v[o].call(l.exports,l,l.exports,c),l.l=!0,l.exports}return c.m=v,c.c=p,c.d=function(o,l,d){c.o(o,l)||Object.defineProperty(o,l,{enumerable:!0,get:d})},c.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},c.t=function(o,l){if(1&l&&(o=c(o)),8&l||4&l&&typeof o=="object"&&o&&o.__esModule)return o;var d=Object.create(null);if(c.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:o}),2&l&&typeof o!="string")for(var f in o)c.d(d,f,(function(b){return o[b]}).bind(null,f));return d},c.n=function(o){var l=o&&o.__esModule?function(){return o.default}:function(){return o};return c.d(l,"a",l),l},c.o=function(o,l){return Object.prototype.hasOwnProperty.call(o,l)},c.p="/",c(c.s=4)}([function(v,p,c){var o=c(1),l=c(2);typeof(l=l.__esModule?l.default:l)=="string"&&(l=[[v.i,l,""]]);var d={insert:"head",singleton:!1};o(l,d),v.exports=l.locals||{}},function(v,p,c){var o,l=function(){return o===void 0&&(o=!!(window&&document&&document.all&&!window.atob)),o},d=function(){var r={};return function(i){if(r[i]===void 0){var s=document.querySelector(i);if(window.HTMLIFrameElement&&s instanceof window.HTMLIFrameElement)try{s=s.contentDocument.head}catch{s=null}r[i]=s}return r[i]}}(),f=[];function b(r){for(var i=-1,s=0;s<f.length;s++)if(f[s].identifier===r){i=s;break}return i}function S(r,i){for(var s={},u=[],m=0;m<r.length;m++){var g=r[m],y=i.base?g[0]+i.base:g[0],C=s[y]||0,O="".concat(y," ").concat(C);s[y]=C+1;var L=b(O),M={css:g[1],media:g[2],sourceMap:g[3]};L!==-1?(f[L].references++,f[L].updater(M)):f.push({identifier:O,updater:h(M,i),references:1}),u.push(O)}return u}function k(r){var i=document.createElement("style"),s=r.attributes||{};if(s.nonce===void 0){var u=c.nc;u&&(s.nonce=u)}if(Object.keys(s).forEach(function(g){i.setAttribute(g,s[g])}),typeof r.insert=="function")r.insert(i);else{var m=d(r.insert||"head");if(!m)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");m.appendChild(i)}return i}var w,x=(w=[],function(r,i){return w[r]=i,w.filter(Boolean).join(`
`)});function a(r,i,s,u){var m=s?"":u.media?"@media ".concat(u.media," {").concat(u.css,"}"):u.css;if(r.styleSheet)r.styleSheet.cssText=x(i,m);else{var g=document.createTextNode(m),y=r.childNodes;y[i]&&r.removeChild(y[i]),y.length?r.insertBefore(g,y[i]):r.appendChild(g)}}function e(r,i,s){var u=s.css,m=s.media,g=s.sourceMap;if(m?r.setAttribute("media",m):r.removeAttribute("media"),g&&btoa&&(u+=`
/*# sourceMappingURL=data:application/json;base64,`.concat(btoa(unescape(encodeURIComponent(JSON.stringify(g))))," */")),r.styleSheet)r.styleSheet.cssText=u;else{for(;r.firstChild;)r.removeChild(r.firstChild);r.appendChild(document.createTextNode(u))}}var t=null,n=0;function h(r,i){var s,u,m;if(i.singleton){var g=n++;s=t||(t=k(i)),u=a.bind(null,s,g,!1),m=a.bind(null,s,g,!0)}else s=k(i),u=e.bind(null,s,i),m=function(){(function(y){if(y.parentNode===null)return!1;y.parentNode.removeChild(y)})(s)};return u(r),function(y){if(y){if(y.css===r.css&&y.media===r.media&&y.sourceMap===r.sourceMap)return;u(r=y)}else m()}}v.exports=function(r,i){(i=i||{}).singleton||typeof i.singleton=="boolean"||(i.singleton=l());var s=S(r=r||[],i);return function(u){if(u=u||[],Object.prototype.toString.call(u)==="[object Array]"){for(var m=0;m<s.length;m++){var g=b(s[m]);f[g].references--}for(var y=S(u,i),C=0;C<s.length;C++){var O=b(s[C]);f[O].references===0&&(f[O].updater(),f.splice(O,1))}s=y}}}},function(v,p,c){(p=c(3)(!1)).push([v.i,`.cdx-list {
margin: 0;

Binary file not shown.

View File

@@ -1,4 +1,4 @@
import{g as N}from"./admin-app-4cec6240.js";function P(x,H){for(var g=0;g<H.length;g++){const b=H[g];if(typeof b!="string"&&!Array.isArray(b)){for(const l in b)if(l!=="default"&&!(l in x)){const n=Object.getOwnPropertyDescriptor(b,l);n&&Object.defineProperty(x,l,n.get?n:{enumerable:!0,get:()=>b[l]})}}}return Object.freeze(Object.defineProperty(x,Symbol.toStringTag,{value:"Module"}))}var E={exports:{}};(function(x,H){(function(g,b){x.exports=b()})(window,function(){return function(g){var b={};function l(n){if(b[n])return b[n].exports;var i=b[n]={i:n,l:!1,exports:{}};return g[n].call(i.exports,i,i.exports,l),i.l=!0,i.exports}return l.m=g,l.c=b,l.d=function(n,i,h){l.o(n,i)||Object.defineProperty(n,i,{enumerable:!0,get:h})},l.r=function(n){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},l.t=function(n,i){if(1&i&&(n=l(n)),8&i||4&i&&typeof n=="object"&&n&&n.__esModule)return n;var h=Object.create(null);if(l.r(h),Object.defineProperty(h,"default",{enumerable:!0,value:n}),2&i&&typeof n!="string")for(var m in n)l.d(h,m,(function(f){return n[f]}).bind(null,m));return h},l.n=function(n){var i=n&&n.__esModule?function(){return n.default}:function(){return n};return l.d(i,"a",i),i},l.o=function(n,i){return Object.prototype.hasOwnProperty.call(n,i)},l.p="/",l(l.s=5)}([function(g,b,l){var n=l(1);typeof n=="string"&&(n=[[g.i,n,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};l(3)(n,i),n.locals&&(g.exports=n.locals)},function(g,b,l){(g.exports=l(2)(!1)).push([g.i,`/**
import{g as N}from"./admin-app-98ae3828.js";function P(x,H){for(var g=0;g<H.length;g++){const b=H[g];if(typeof b!="string"&&!Array.isArray(b)){for(const l in b)if(l!=="default"&&!(l in x)){const n=Object.getOwnPropertyDescriptor(b,l);n&&Object.defineProperty(x,l,n.get?n:{enumerable:!0,get:()=>b[l]})}}}return Object.freeze(Object.defineProperty(x,Symbol.toStringTag,{value:"Module"}))}var E={exports:{}};(function(x,H){(function(g,b){x.exports=b()})(window,function(){return function(g){var b={};function l(n){if(b[n])return b[n].exports;var i=b[n]={i:n,l:!1,exports:{}};return g[n].call(i.exports,i,i.exports,l),i.l=!0,i.exports}return l.m=g,l.c=b,l.d=function(n,i,h){l.o(n,i)||Object.defineProperty(n,i,{enumerable:!0,get:h})},l.r=function(n){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},l.t=function(n,i){if(1&i&&(n=l(n)),8&i||4&i&&typeof n=="object"&&n&&n.__esModule)return n;var h=Object.create(null);if(l.r(h),Object.defineProperty(h,"default",{enumerable:!0,value:n}),2&i&&typeof n!="string")for(var m in n)l.d(h,m,(function(f){return n[f]}).bind(null,m));return h},l.n=function(n){var i=n&&n.__esModule?function(){return n.default}:function(){return n};return l.d(i,"a",i),i},l.o=function(n,i){return Object.prototype.hasOwnProperty.call(n,i)},l.p="/",l(l.s=5)}([function(g,b,l){var n=l(1);typeof n=="string"&&(n=[[g.i,n,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};l(3)(n,i),n.locals&&(g.exports=n.locals)},function(g,b,l){(g.exports=l(2)(!1)).push([g.i,`/**
* Plugin styles
*/
.ce-header {

Binary file not shown.

View File

@@ -3,25 +3,25 @@
"file": "assets/NativeImageBlock-e3b0c442.css",
"src": "NativeImageBlock.css"
},
"_NativeImageBlock-c80786a0.js": {
"_NativeImageBlock-f0434154.js": {
"css": [
"assets/NativeImageBlock-e3b0c442.css"
],
"file": "assets/NativeImageBlock-c80786a0.js",
"file": "assets/NativeImageBlock-f0434154.js",
"imports": [
"resources/js/admin-app.js"
],
"isDynamicEntry": true
},
"_bundle-0252d10e.js": {
"file": "assets/bundle-0252d10e.js",
"_bundle-57d1f9b0.js": {
"file": "assets/bundle-57d1f9b0.js",
"imports": [
"resources/js/admin-app.js"
],
"isDynamicEntry": true
},
"_bundle-a2237f43.js": {
"file": "assets/bundle-a2237f43.js",
"_bundle-7a808777.js": {
"file": "assets/bundle-7a808777.js",
"imports": [
"resources/js/admin-app.js"
],
@@ -47,11 +47,11 @@
"assets/admin-app-935fc652.css"
],
"dynamicImports": [
"_NativeImageBlock-c80786a0.js",
"_NativeImageBlock-f0434154.js",
"resources/js/vue/PostEditor.vue",
"resources/js/vue/VueEditorJs.vue"
],
"file": "assets/admin-app-4cec6240.js",
"file": "assets/admin-app-98ae3828.js",
"imports": [
"_index-8746c87e.js"
],
@@ -74,12 +74,12 @@
"css": [
"assets/PostEditor-8d534a4a.css"
],
"file": "assets/PostEditor-71d46622.js",
"file": "assets/PostEditor-e067573f.js",
"imports": [
"resources/js/vue/VueEditorJs.vue",
"_NativeImageBlock-c80786a0.js",
"_bundle-a2237f43.js",
"_bundle-0252d10e.js",
"_NativeImageBlock-f0434154.js",
"_bundle-57d1f9b0.js",
"_bundle-7a808777.js",
"resources/js/admin-app.js",
"_index-8746c87e.js"
],
@@ -88,10 +88,10 @@
},
"resources/js/vue/VueEditorJs.vue": {
"dynamicImports": [
"_bundle-0252d10e.js",
"_bundle-a2237f43.js"
"_bundle-7a808777.js",
"_bundle-57d1f9b0.js"
],
"file": "assets/VueEditorJs-d25d3072.js",
"file": "assets/VueEditorJs-d588a788.js",
"imports": [
"resources/js/admin-app.js",
"_index-8746c87e.js"

Binary file not shown.

View File

@@ -0,0 +1 @@
f4889e55-2bf2-4ac7-abdf-24f9063ea9ac

View File

@@ -1,4 +1,4 @@
const Ziggy = {"url":"https:\/\/productalert.co","port":null,"defaults":{},"routes":{"debugbar.openhandler":{"uri":"_debugbar\/open","methods":["GET","HEAD"]},"debugbar.clockwork":{"uri":"_debugbar\/clockwork\/{id}","methods":["GET","HEAD"]},"debugbar.assets.css":{"uri":"_debugbar\/assets\/stylesheets","methods":["GET","HEAD"]},"debugbar.assets.js":{"uri":"_debugbar\/assets\/javascript","methods":["GET","HEAD"]},"debugbar.cache.delete":{"uri":"_debugbar\/cache\/{key}\/{tags?}","methods":["DELETE"]},"sanctum.csrf-cookie":{"uri":"sanctum\/csrf-cookie","methods":["GET","HEAD"]},"ignition.healthCheck":{"uri":"_ignition\/health-check","methods":["GET","HEAD"]},"ignition.executeSolution":{"uri":"_ignition\/execute-solution","methods":["POST"]},"ignition.updateConfig":{"uri":"_ignition\/update-config","methods":["POST"]},"api.auth.login.post":{"uri":"api\/login","methods":["POST"]},"api.auth.logout.post":{"uri":"api\/logout","methods":["POST"]},"api.admin.post.get":{"uri":"api\/admin\/post\/{id}","methods":["GET","HEAD"]},"api.admin.country-locales":{"uri":"api\/admin\/country-locales","methods":["GET","HEAD"]},"api.admin.categories":{"uri":"api\/admin\/categories\/{country_locale_slug}","methods":["GET","HEAD"]},"api.admin.authors":{"uri":"api\/admin\/authors","methods":["GET","HEAD"]},"api.admin.upload.cloud.image":{"uri":"api\/admin\/image\/upload","methods":["POST"]},"api.admin.post.upsert":{"uri":"api\/admin\/admin\/post\/upsert","methods":["POST"]},"feeds.main":{"uri":"posts.rss","methods":["GET","HEAD"]},"login":{"uri":"login","methods":["GET","HEAD"]},"logout":{"uri":"logout","methods":["POST"]},"register":{"uri":"register","methods":["GET","HEAD"]},"password.request":{"uri":"password\/reset","methods":["GET","HEAD"]},"password.email":{"uri":"password\/email","methods":["POST"]},"password.reset":{"uri":"password\/reset\/{token}","methods":["GET","HEAD"]},"password.update":{"uri":"password\/reset","methods":["POST"]},"password.confirm":{"uri":"password\/confirm","methods":["GET","HEAD"]},"dashboard":{"uri":"admin","methods":["GET","HEAD"]},"about":{"uri":"admin\/about","methods":["GET","HEAD"]},"users.index":{"uri":"admin\/users","methods":["GET","HEAD"]},"posts.manage":{"uri":"admin\/posts","methods":["GET","HEAD"]},"posts.manage.edit":{"uri":"admin\/posts\/edit\/{post_id}","methods":["GET","HEAD"]},"posts.manage.new":{"uri":"admin\/posts\/new","methods":["GET","HEAD"]},"profile.show":{"uri":"admin\/profile","methods":["GET","HEAD"]},"profile.update":{"uri":"admin\/profile","methods":["PUT"]},"home":{"uri":"\/","methods":["GET","HEAD"]},"home.country":{"uri":"{country}","methods":["GET","HEAD"]},"home.country.posts":{"uri":"{country}\/posts","methods":["GET","HEAD"]},"home.country.post":{"uri":"{country}\/posts\/{post_slug}","methods":["GET","HEAD"]},"home.country.category":{"uri":"{country}\/{category}","methods":["GET","HEAD"]}}};
const Ziggy = {"url":"https:\/\/productalert.co","port":null,"defaults":{},"routes":{"debugbar.openhandler":{"uri":"_debugbar\/open","methods":["GET","HEAD"]},"debugbar.clockwork":{"uri":"_debugbar\/clockwork\/{id}","methods":["GET","HEAD"]},"debugbar.assets.css":{"uri":"_debugbar\/assets\/stylesheets","methods":["GET","HEAD"]},"debugbar.assets.js":{"uri":"_debugbar\/assets\/javascript","methods":["GET","HEAD"]},"debugbar.cache.delete":{"uri":"_debugbar\/cache\/{key}\/{tags?}","methods":["DELETE"]},"sanctum.csrf-cookie":{"uri":"sanctum\/csrf-cookie","methods":["GET","HEAD"]},"ignition.healthCheck":{"uri":"_ignition\/health-check","methods":["GET","HEAD"]},"ignition.executeSolution":{"uri":"_ignition\/execute-solution","methods":["POST"]},"ignition.updateConfig":{"uri":"_ignition\/update-config","methods":["POST"]},"api.auth.login.post":{"uri":"api\/login","methods":["POST"]},"api.auth.logout.post":{"uri":"api\/logout","methods":["POST"]},"api.admin.post.get":{"uri":"api\/admin\/post\/{id}","methods":["GET","HEAD"]},"api.admin.country-locales":{"uri":"api\/admin\/country-locales","methods":["GET","HEAD"]},"api.admin.categories":{"uri":"api\/admin\/categories\/{country_locale_slug}","methods":["GET","HEAD"]},"api.admin.authors":{"uri":"api\/admin\/authors","methods":["GET","HEAD"]},"api.admin.upload.cloud.image":{"uri":"api\/admin\/image\/upload","methods":["POST"]},"api.admin.post.upsert":{"uri":"api\/admin\/admin\/post\/upsert","methods":["POST"]},"feeds.main":{"uri":"posts.rss","methods":["GET","HEAD"]},"login":{"uri":"login","methods":["GET","HEAD"]},"logout":{"uri":"logout","methods":["POST"]},"register":{"uri":"register","methods":["GET","HEAD"]},"password.request":{"uri":"password\/reset","methods":["GET","HEAD"]},"password.email":{"uri":"password\/email","methods":["POST"]},"password.reset":{"uri":"password\/reset\/{token}","methods":["GET","HEAD"]},"password.update":{"uri":"password\/reset","methods":["POST"]},"password.confirm":{"uri":"password\/confirm","methods":["GET","HEAD"]},"dashboard":{"uri":"admin","methods":["GET","HEAD"]},"about":{"uri":"admin\/about","methods":["GET","HEAD"]},"users.index":{"uri":"admin\/users","methods":["GET","HEAD"]},"posts.manage":{"uri":"admin\/posts","methods":["GET","HEAD"]},"posts.manage.edit":{"uri":"admin\/posts\/edit\/{post_id}","methods":["GET","HEAD"]},"posts.manage.indexing":{"uri":"admin\/posts\/indexing\/{post_id}","methods":["GET","HEAD"]},"posts.manage.new":{"uri":"admin\/posts\/new","methods":["GET","HEAD"]},"profile.show":{"uri":"admin\/profile","methods":["GET","HEAD"]},"profile.update":{"uri":"admin\/profile","methods":["PUT"]},"home":{"uri":"\/","methods":["GET","HEAD"]},"home.country":{"uri":"{country}","methods":["GET","HEAD"]},"home.country.posts":{"uri":"{country}\/posts","methods":["GET","HEAD"]},"home.country.post":{"uri":"{country}\/posts\/{post_slug}","methods":["GET","HEAD"]},"home.country.category":{"uri":"{country}\/{category}","methods":["GET","HEAD"]}}};
if (typeof window !== 'undefined' && typeof window.Ziggy !== 'undefined') {
Object.assign(Ziggy.routes, window.Ziggy.routes);

View File

@@ -1,7 +1,16 @@
<div class="alert alert-success" role="alert">
<h3 class="">Webmaster Announcement</h3>
<div class="text-muted">
<p class="fw-bold mb-0">Change Log 2/8/2023 12.03am</p>
<ul>
<li>(Feature) Add Index to Search Engines button</li>
<li>(Feature) Auto set author on new post</li>
<li>(Feature) Only publish status must fill in all post fields, others status can save with minimum title and
slug only</li>
<li>(Fix) Post list has timezone error</li>
</ul>
<p class="fw-bold mb-0">Change Log 1/8/2023 10.35pm</p>
<ul>
<li>(Feature) Auto set category on new post</li>
<li>(Feature) Auto set author on new post</li>
<li>(Feature) Only publish status must fill in all post fields, others status can save with minimum title and

View File

@@ -75,8 +75,13 @@ class="img-fluid rounded-2" alt=""></td>
@endif
</td>
<td>
<div><a href="{{ route('posts.manage.edit', ['post_id' => $post->id]) }}"
class="btn">Edit</a></div>
<div class="d-grid gap-2">
<a href="{{ route('posts.manage.indexing', ['post_id' => $post->id]) }}"
class="btn">Index to Search Engines</a>
<a href="{{ route('posts.manage.edit', ['post_id' => $post->id]) }}"
class="btn">Edit</a>
</div>
</td>
</tr>
@endforeach

View File

@@ -29,6 +29,8 @@
Route::get('posts/edit/{post_id}', [\App\Http\Controllers\Admin\PostController::class, 'edit'])->name('posts.manage.edit');
Route::get('posts/indexing/{post_id}', [\App\Http\Controllers\Admin\PostController::class, 'indexing'])->name('posts.manage.indexing');
Route::get('posts/new', [\App\Http\Controllers\Admin\PostController::class, 'new'])->name('posts.manage.new');
Route::get('profile', [\App\Http\Controllers\Admin\ProfileController::class, 'show'])->name('profile.show');

View File

@@ -0,0 +1,13 @@
{
"type": "service_account",
"project_id": "productalert",
"private_key_id": "4ead93eae515ecf0c65792ce3571cd41aaeed1d1",
"private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQChYmzeMFwyDiaB\nVifBsLDw/k5SZ+hEe8wMxKTHLYLEWYKa2OGPRK6ziXnKJzbo8ptEOklD+S8U/AOI\nqqMGAPHaHezleuD8NGMzNduoAdBvM4h3nniKWzAsmkFzvfLlHZa7rKKCfmMHPQ6S\nXi0Xrw5SvJpM0moZ57R0cPqH7IPrZLW0ESW+ImWTQGBxFTyRbX0muSCxR3d/xRFb\nVHhcJvjRRcsK3REZnPO9NHHVwgEgtl28khaKIb/yHrlVC2bGzMoNUpMIMzZq7EvL\nINBSkWdPLqWky2nb4QJNRbXAbjf8Mzx+DZWcH0pY1taJGcanCjC7G6MZq6aZeh2r\nAbXKJc17AgMBAAECggEABJRvpNHi2T7NOUVnJRgtD/cU5OzISs09P1gt7u3BNMOa\nMRJvkD/G5MHFgDGjCB2pFK4Xby45TP374bB/UN0iVT9yfhlXHNZ7Ft8ekoLUAJvf\nRw8Vuk4X12Qx8FAXKQkGbTaweUXklzYp3Yh+Uho911Dn4L87Peyf5+AJlBA9DCcz\nbk5IPhIsFITCWiX30HzBE9gZjUFVSBbyAafXkup8ZWDWVRHRTTwJP0ud8pzT7ENc\nEQ3TlvhS5eFTyG7uuM/ffBouDu4VbLVVuN0WbiW14hUHdj4nGC6jY/C0EnyyecGS\nsmjjV6Re41a1m4TG+BBEBnBMWIws3Dn+d1cVVv5jWQKBgQDbUp2IvNguo+OLIyi8\njBU+N4sEtGvZGrXxKUYCp54MaKO0dvVU0Q6k/cMR+0hvl0biRLUt3gZ1KgH/63ET\nlnRUTSx3dVntHCnyThqUOzB4btksnVdjkeNjB8hlSEs0n9usXabIRcl3U8a+0DeU\n0cKagw4bnWQxgY9VKQd6AZaReQKBgQC8X20pAxFv/HvvrS1cGenYHyAnCthJhfLH\nvly/yt8MIc4Dr+VMalMZXTRoyrMH+CgFbNHsWRJXHm58pse0PfWid1tgudoh2sdt\n2xAyVPqoSsUTRU9FuJSt8WW6qRQ4ouzY688OyLx7T1sSWHR4DgyvSdVmJnn2p80M\nRpN6eI4tkwKBgAvjDma61XyxpUOFRE/zx7L3j7FRlgbOS84mToUWUJqbkUPWrrVK\nH2ER3+C5ndNuf4kD8E3sGq1++VzFhftpzCRFioNu+NDBFgTr9sTR8G6Wk263mGTt\nI0XaxiG3KVxQzbcp3EA+iAzPnZX58wk91S5KrBkTDrsgKoSTFLSoIWEBAoGBAIJP\nIRx12uI1LycmDXLhGjs/jOZ1QhnaZ5B1x4OFu7aQzAsQ6vZptwKcz1yOnDqvGEBo\nfu+Yzm8lxhjE5vFwyzOQjc3jw1oYFk2QdSvcTWmOD7a9A5Gflnqdu1ndDPgA/Qcy\nWRJJGtnSk5WlSyyhy3SXBuCbTVOr0NTlHbBjJTexAoGAMsiGkM2iUlKAb/sUrsZ7\nnhK5ZqoUiiR6hEPsp7gCEZcHsYiwx+1KAn7WZWm1p8uTQ7CD5g5zmPSdqBPUzlLF\nvinjV6v64nTrwsr9ZlkrT8VQ5cC6EZnoKJBXxkhIQraWdecOEpvT+io/km0tcaPh\nB6ECRLVDa2wN9c810lJOnDA=\n-----END PRIVATE KEY-----\n",
"client_email": "indexing@productalert.iam.gserviceaccount.com",
"client_id": "115053843796317309652",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/indexing%40productalert.iam.gserviceaccount.com",
"universe_domain": "googleapis.com"
}