<?php
namespace Modules\ProductionComponents\Services;
use Modules\ProductionComponents\Repositories\ThreadInfoRepositoryEloquent;
class StoreThreadService
{
public $thread_info;
public function __construct(ThreadInfoRepositoryEloquent $thread_info)
{
$this->thread_info = $thread_info;
}
public function store_thread($data)
{
$this->thread_info->create([
'thread_code'=>$data['thread_code'],
'thread_name'=>$data['thread_name'],
'created_by'=>auth()->user()->id,
'created_at'=>now()
]);