app/Http/Controllers/UnitController.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)
    {
        $input['unit'] = $request->unit;
        Unit::create($input);
        return redirect()->route('unit.index');
    }
public function store ( Request $ request ) { $ input [ 'unit' ] = $ request -> unit ; Unit :: create ( $ input ) ; return redirect ( ) -> route ( 'unit.index' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .