app/Http/Controllers/ProductsController.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($subcategoryID)
    {
        if(auth()->user()->isAdmin()){
            return view('pages.products.create')->with('subcategoryID', $subcategoryID);
        }
        else abort(404);
    }
public function create ( $ subcategoryID ) { if ( auth ( ) -> user ( ) -> isAdmin ( ) ) { return view ( 'pages.products.create' ) -> with ( 'subcategoryID' , $ subcategoryID ) ; } else abort ( 404 ) ; }
Show the form for creating a new resource.
Show the form for creating a new resource .