Add (initial): futurewalker code

This commit is contained in:
2023-11-20 00:15:18 +08:00
parent f8602cb456
commit 9ce3e5c82a
166 changed files with 15941 additions and 1072 deletions

View File

@@ -9,12 +9,19 @@
class PublishIndexPostTask
{
public static function handle(Post $post)
public static function handle(int $post_id)
{
$post->published_at = now();
$post = Post::find($post_id);
if (is_null($post))
{
return ;
}
$post->status = 'publish';
if ($post->save()) {
if (app()->environment() == 'production') {
if ((app()->environment() == 'production') && (config('platform.global.indexing'))) {
$post_url = route('front.post', ['slug' => $post->slug, 'category_slug' => $post->category->slug]);
try {