app/Http/Controllers/AdminCategoryController.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)
    {
        $validatedData = $request->validate([
            'name' => 'required',
            'slug' => 'required',
            'description' => 'required'
        ]);
        Category::create($validatedData);
        return redirect('dashboard/categories')->with('success', 'Saved Success');
    }
public function store ( Request $ request ) { $ validatedData = $ request -> validate ( [ 'name' => 'required' , 'slug' => 'required' , 'description' => 'required' ] ) ; Category :: create ( $ validatedData ) ; return redirect ( 'dashboard/categories' ) -> with ( 'success' , 'Saved Success' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .