<?php

namespace App\Http\Controllers\backend;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Models\Media;


class MediaController extends Controller
{
    public function create(){
        
    
        

        return view('backend.produit.extension.diapo');
       }

    
       public function store( Request $request){
   
        $article= new Media();
        
        
        if($request->hasFile('diapo')){
            $article->image = $request->image->store('image');
           }
           
           $article->save();
           return redirect('produits');
   
    }
}
