Add (news bites)

This commit is contained in:
2023-11-21 19:18:11 +08:00
parent 2e38a4120c
commit 3210563e42
37 changed files with 1581 additions and 153 deletions

View File

@@ -4,22 +4,31 @@
use App\Helpers\FirstParty\ImageGen\ImageGen;
use App\Http\Controllers\Controller;
use App\Jobs\Tasks\BrowseRSSLatestNewsTask;
use App\Models\Post;
use App\Notifications\PostWasPublished;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Notification;
use LaravelFreelancerNL\LaravelIndexNow\Facades\IndexNow;
use LaravelGoogleIndexing;
use App\Models\Post;
use Illuminate\Support\Facades\Notification;
use App\Notifications\PostWasPublished;
class TestController extends Controller
{
public function opml(Request $request)
{
$raw_posts = BrowseRSSLatestNewsTask::handleSingle('https://hnrss.org/newest?q=ai', 240);
foreach ($raw_posts as $raw_post) {
dump($raw_post);
}
}
public function notification(Request $request)
{
$post = Post::find(1);
$post = Post::find(1);
Notification::route('facebook','default')->notify(new PostWasPublished($post));
Notification::route('facebook', 'default')->notify(new PostWasPublished($post));
}
public function imageGen(Request $request)