app/Http/Controllers/CategoryController.php
/**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
Store a newly created resource in storage.
Store a newly created resource in storage .
public function store(Request $request)
    {
        $category=new category();
        $category->categoryname=$request->categoryname;
        $category->save();
        return back();
    }
public function store ( Request $ request ) { $ category = new category ( ) ; $ category -> categoryname = $ request -> categoryname ; $ category -> save ( ) ; return back ( ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .