app/Http/Controllers/SubCategoryController.php
/**
     * Show the form for editing the specified resource.
     *
     * @param  \App\SubCategory  $subCategory
     * @return \Illuminate\Http\Response
     */
Show the form for editing the specified resource.
Show the form for editing the specified resource .
public function edit(SubCategory $subcategory)
    {   
        $categoryLists = Category::get(['id','name']);
        return view('sub_category.edit')->with(compact('categoryLists','subcategory'));
    }
public function edit ( SubCategory $ subcategory ) { $ categoryLists = Category :: get ( [ 'id' , 'name' ] ) ; return view ( 'sub_category.edit' ) -> with ( compact ( 'categoryLists' , 'subcategory' ) ) ; }
Show the form for editing the specified resource.
Show the form for editing the specified resource .