public function store(CategoriesRequest $request)
    {
        $category = Category::create(
            $request->all()
        );

        return redirect()->route('categories.edit', $category)->with(
            'status', trans('globals.success_text')
        );
    }
public function store(CategoriesRequest $request)
    {
        $category = Category::create(
            $request->all()
        );

        return redirect()->route('categories.edit', $category)->with(
            'status', trans('globals.success_text')
        );
    }
public function store ( CategoriesRequest $ request ) { $ category = Category :: create ( $ request -> all ( ) ) ; return redirect ( ) -> route ( 'categories.edit' , $ category ) -> with ( 'status' , trans ( 'globals.success_text' ) ) ; }
Stores a new category.

@param  CategoriesRequest $request

@return void
Stores a new category .