<?php

namespace App\View\Components\ActivityFeed;

use App\Models\ActivityFeed;
use Illuminate\View\Component;

class ActivityFeedComponent extends Component
{
    public $activityFeeds;

    public function __construct()
    {
        $this->activityFeeds = ActivityFeed::where(currentCompanyCurrentBranch())->orderBy('id', 'DESC')->paginate(10);
    }

    public function render()
    {
        return view('components.activity-feed.activity-feed-component', [
            'activityFeeds' => $this->activityFeeds
        ]);
    }
}
