app/Http/Controllers/Admin/VisiMisiController.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)
    {
        $title = $request->input('title');
        $desc = $request->input('desc');
        $pict = $request->file('pict');
        VisiMisi::create([
            'visimisi_title' => $title,
            'visimisi_description' => $desc,
            'visimisi_picture' => $pict->getClientOriginalName(),
        ]);
        $pict->move('assets/visimisi', $pict->getClientOriginalName());
        return redirect()->to('adminpages/visimisi');
    }
public function store ( Request $ request ) { $ title = $ request -> input ( 'title' ) ; $ desc = $ request -> input ( 'desc' ) ; $ pict = $ request -> file ( 'pict' ) ; VisiMisi :: create ( [ 'visimisi_title' => $ title , 'visimisi_description' => $ desc , 'visimisi_picture' => $ pict -> getClientOriginalName ( ) , ] ) ; $ pict -> move ( 'assets/visimisi' , $ pict -> getClientOriginalName ( ) ) ; return redirect ( ) -> to ( 'adminpages/visimisi' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .