<?php

namespace Modules\Factor\Http\Controllers;

use Illuminate\Contracts\Support\Renderable;
use Illuminate\Http\Request;
use Illuminate\Routing\Controller;
use Modules\Factor\Services\FactorService;

class FactorController extends Controller
{
   protected $service;

   public function __construct(FactorService $factorService)
   {
       $this->service=$factorService;
       $this->middleware('auth:sanctum');
   }

    public function factorList()
    {
        return $this->service->list();
   }
   public function chequeFactorList()
    {
        return $this->service->chequeFactors();
   }

   public function factorProducts()
    {
        return $this->service->factorProducts();
   }

    public function addFactor(Request $request)
    {
        return $this->service->add($request);
   }

   public function showFactor($id)
    {
        return $this->service->show($id);
   }
   public function deleteFactor($id)
    {
        return $this->service->delete($id);
   }

   public function editFactor($id,Request $request)
    {
        return $this->service->edit($id,$request);
   }

}

