app/Http/Controllers/TheBlog/ArticleController.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)
    {
        $request->validate([
            'image' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:2048',
        ]);
        $imageName = time().'.'.$request->image->extension(); 
          store image in stoarge folder
        $request->image->storeAs('images', $imageName);
    }
public function store ( Request $ request ) { $ request -> validate ( [ 'image' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:2048' , ] ) ; $ imageName = time ( ) . '.' . $ request -> image -> extension ( ) ; $ request -> image -> storeAs ( 'images' , $ imageName ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .
// // store image in stoarge folder