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

@@ -2,18 +2,25 @@
use App\Helpers\FirstParty\OpenAI\OpenAI;
use App\Jobs\AISerpGenArticleJob;
use App\Jobs\BrowseAndWriteWithAIJob;
use App\Jobs\FillPostMetadataJob;
use App\Jobs\GenerateArticleFeaturedImageJob;
use App\Jobs\GenerateArticleJob;
use App\Jobs\SchedulePublishPost;
use App\Jobs\Tasks\GetNewsSerpTask;
use App\Jobs\Tasks\ParseNewsSerpDomainsTask;
use App\Jobs\Tasks\ScrapeUrlBodyTask;
use App\Jobs\Tasks\WriteWithAITask;
use App\Models\Category;
use App\Models\NewsSerpResult;
use App\Models\Post;
use App\Models\SerpUrl;
use App\Notifications\PostIncomplete;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
//use Notification;
// use LaravelFreelancerNL\LaravelIndexNow\Facades\IndexNow;
// use LaravelGoogleIndexing;
@@ -27,6 +34,30 @@
| be assigned to the "web" middleware group. Make something great!
|
*/
Route::get('/incomplete/post', function (Request $request) {
$post = Post::find(1);
Notification::route(get_notification_channel(), get_notification_user_id())->notify(new PostIncomplete($post));
});
Route::get('/fire/now', function (Request $request) {
BrowseAndWriteWithAIJob::dispatch()->onQueue('default')->onConnection('default');
});
Route::get('/aj/oooi', function (Request $request) {
WriteWithAITask::handle(1);
//return view('welcome');
});
Route::get('/aj/curj', function (Request $request) {
FillPostMetadataJob::dispatch($request->input('id', 1))->onQueue('default')->onConnection('default');
//return view('welcome');
});
Route::get('/now-minute', function (Request $request) {
dd(now()->minute);

View File

@@ -23,12 +23,12 @@
Route::get('/disclaimer', [App\Http\Controllers\Front\FrontHomeController::class, 'disclaimer'])->name('front.disclaimer');
Route::get('/news', [App\Http\Controllers\Front\FrontListController::class, 'index'])->name('front.all');
Route::get('/latest', [App\Http\Controllers\Front\FrontListController::class, 'index'])->name('front.all');
Route::get('/news/{slug}', [App\Http\Controllers\Front\FrontPostController::class, 'redirect'])->name('front.post.redirect');
Route::post('/search', [App\Http\Controllers\Front\FrontListController::class, 'search'])->name('front.search');
Route::get('/{category_slug}/{slug}', [App\Http\Controllers\Front\FrontPostController::class, 'index'])->name('front.post');
Route::get('/{category_slug}', [App\Http\Controllers\Front\FrontListController::class, 'category'])
->where('category_slug', '^(automotive|business|trading|information-technology|marketing|office|telecommunications|food-drink|collectibles|pets|photography|hobbies-gifts|hunting-fishing|law|politics|home-garden|shopping|fashion-clothing|real-estate|family|wedding|immigration|society|education|languages|health|beauty|psychology|wellness|religion-spirituality|tips-tricks|how-to|holiday|world-festivals|travel|outdoors|computer|phones|gadgets|technology|social-networks|ai)$')
->where('category_slug', '^(updates|opinions|features|new-launches|tutorials|reviews)$')
->name('front.category');