/**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(TypeRequest $request)
 {
     $product_type = ProductType::create(['product_type_name' => $request->product_type_name, 'product_category_id' => $request->product_category_id]);
     $product_category = ProductCategory::all();
     $product_type = ProductType::all();
     return view('product.productTypeList', ['product_type' => $product_type, 'product_category' => $product_category]);
 }
 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(CategoryRequest $request)
 {
     $product_category = ProductCategory::create(['product_category_name' => $request->product_category_name]);
     //redirection after saving
     $all_category = ProductCategory::all();
     return view('product.productCategoryList', ['all_category' => $all_category]);
 }
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $productCategoryList = ProductCategory::all();
     return view('product_category.productCategoryList', ['productCategories' => $productCategoryList]);
 }
 /**
  * Show the form for creating a new resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function create()
 {
     $productCategory = ProductCategory::all();
     return view('product_sub_category.addProductSubCategory', ['productCategories' => $productCategory]);
 }
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $all_cateogry = ProductCategory::all();
     return response()->json($all_cateogry);
 }