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