<?php

namespace App\Observers;

use Illuminate\Support\Facades\Auth;
use App\BatchWiseSubject;

class BatchWiseSubjectObserver
{
    /**
     * Handle the batch wise subject "created" event.
     *
     * @param  \App\BatchWiseSubject  $batchWiseSubject
     * @return void
     */
    public function created(BatchWiseSubject $batchWiseSubject)
    {
        //
    }

    /**
     * Handle the batch wise subject "updated" event.
     *
     * @param  \App\BatchWiseSubject  $batchWiseSubject
     * @return void
     */
    public function updated(BatchWiseSubject $batchWiseSubject)
    {
        //
    }

    /**
     * Handle the batch wise subject "deleted" event.
     *
     * @param  \App\BatchWiseSubject  $batchWiseSubject
     * @return void
     */
    public function deleted(BatchWiseSubject $batchWiseSubject)
    {
        //
    }

    /**
     * Handle the batch wise subject "restored" event.
     *
     * @param  \App\BatchWiseSubject  $batchWiseSubject
     * @return void
     */
    public function restored(BatchWiseSubject $batchWiseSubject)
    {
        //
    }

    /**
     * Handle the batch wise subject "force deleted" event.
     *
     * @param  \App\BatchWiseSubject  $batchWiseSubject
     * @return void
     */
    public function forceDeleted(BatchWiseSubject $batchWiseSubject)
    {
        //
    }

    
    /**
     * Handle the BatchWiseSubject "creating" event.
     *
     * @param  \App\BatchWiseSubject  $BatchWiseSubject
     * @return void
     */
    public function creating(BatchWiseSubject $BatchWiseSubject)
    {
        $id = Auth::id();
        $BatchWiseSubject->created_by=$id;
        $BatchWiseSubject->updated_by=$id;   
    }

    /**
     * Handle the BatchWiseSubject "updating" event.
     *
     * @param  \App\BatchWiseSubject  $BatchWiseSubject
     * @return void
     */
    public function updating(BatchWiseSubject $BatchWiseSubject)
    {
      
        $id = Auth::id();
        $BatchWiseSubject->updated_by=$id;   
    }
}
