<?php

use Livewire\Component;
use Livewire\WithPagination;
use App\Models\SocialPost;

return new class extends Component
{
    use WithPagination;

    public function render()
    {
        $posts = SocialPost::where('platform', 'facebook')
            ->where('status', 'show')
            ->latest()
            ->paginate(12);

        return $this->view([
            'posts' => $posts,
        ])->layout('layouts::frontend');
    }

    protected function view($data = [])
    {
        return app('view')->file('D:\02-my freelance\00-DR_Padhi\DR_PADHI\storage\framework/views/livewire/views/1a151097.blade.php', $data);
    }
};
