<?php

namespace App\Domain\Feeds\Observers;
use App\Models\User;
use App\Domain\Feeds\Models\Feed;


class NovaFeedAdsObserver
{
    public function creating(Feed $feed){
        if(str_contains( request()->getPathInfo(), '/nova-api/feed-ads')){
            $user = User::system();
            $feed->user_id = $user->id;
            $feed->is_ads = true;
            $feed->created_at = now();
            $feed->updated_at = now();
        }
    }
}
