app/Http/Controllers/Admin/ListBiograpyController.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');
        $sub_title = $request->input('sub_title');
        $image = $request->file('image');
        $list1 = $request->input('list1');
        $list2 = $request->input('list2');
        $list3 = $request->input('list3');
        $list4 = $request->input('list4');
        $desc = $request->input('desc');
        ListBiograpy::create([
            'bl_title' => $title,
            'bl_sub_title' => $sub_title,
            'bl_image' => $image->getClientOriginalName(),
            'bl_list1' => $list1,
            'bl_list2' => $list2,
            'bl_list3' => $list3,
            'bl_list4' => $list4,
            'bl_desc' => $desc,
        ]);
        $image->store('/assets/ListBiograpy');
        return redirect()->to('adminpages/biograpylist');
    }
public function store ( Request $ request ) { $ title = $ request -> input ( 'title' ) ; $ sub_title = $ request -> input ( 'sub_title' ) ; $ image = $ request -> file ( 'image' ) ; $ list1 = $ request -> input ( 'list1' ) ; $ list2 = $ request -> input ( 'list2' ) ; $ list3 = $ request -> input ( 'list3' ) ; $ list4 = $ request -> input ( 'list4' ) ; $ desc = $ request -> input ( 'desc' ) ; ListBiograpy :: create ( [ 'bl_title' => $ title , 'bl_sub_title' => $ sub_title , 'bl_image' => $ image -> getClientOriginalName ( ) , 'bl_list1' => $ list1 , 'bl_list2' => $ list2 , 'bl_list3' => $ list3 , 'bl_list4' => $ list4 , 'bl_desc' => $ desc , ] ) ; $ image -> store ( '/assets/ListBiograpy' ) ; return redirect ( ) -> to ( 'adminpages/biograpylist' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .