app/Http/Controllers/Admin/ProductController.php
/**
     * Show the form for creating a new resource.
     *
     * @return \Illuminate\Http\Response
     */
Show the form for creating a new resource.
@return \Illuminate\Http\Response
Show the form for creating a new resource . @return \ Illuminate \ Http \ Response
public function create(Request $request)
    {
        $categories = $this->category->get();
        $sizes = $this->size->where('category_id', $categories[0]->id)->get();
        return view('admin.web.product.add-product', compact('categories', 'sizes'));
    }
public function create ( Request $ request ) { $ categories = $ this -> category -> get ( ) ; $ sizes = $ this -> size -> where ( 'category_id' , $ categories [ 0 ] -> id ) -> get ( ) ; return view ( 'admin.web.product.add-product' , compact ( 'categories' , 'sizes' ) ) ; }
Show the form for creating a new resource.
Show the form for creating a new resource .