hadis's avatar
Level 1

how to resize image in laravel

I want to upload an image and resize with laravel but resize() and fit() methods not work what should I do?

controller:

 public function store(Request $request)
    {
        $index_image = $request->file('index_image')->store('uploads');
        $indexArticle=[
            'title'=>$request->input('title'),
            'short_explain'=>$request->input('short_explain'),
            //image storage
            'index_image' => $index_image,
        ];
        indexArticle::create($indexArticle);
}
0 likes
2 replies
jlrdw's avatar

I would consider using a package like intervention.

1 like

Please or to participate in this conversation.