app/Http/Controllers/CommunicationEquipmentController.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(CommunicationEquipmentRequest $request)
    {
        $this->validate($request, [
            'serial_number' => 'required|unique:c4s_equipment,serial_number',
            'unitcode' => 'required',
            'pamu' => 'required',
            'status' => 'required',
            'specification' => 'required',
            'nomenclature_id' => 'required',
        ]);
        $equipments = CommunicationEquipment::create([
            'serial_number' => $request->input('serial_number'),
            'unitcode' => $request->input('unitcode'),
            'pamu' => $request->input('pamu'),
            'status' => $request->input('status'),
            'specification' => $request->input('specification'),
            'remarks' => $request->input('remarks'),
            'date_acquired' => $request->input('date_acquired'),
            'cost_acquired' => $request->input('cost_acquired'),
            'nomenclature_id' => $request->input('nomenclature_id'),
        ]);
        return redirect()->route('c4s equipment - create')->withStatus(__('C4s Equipment Successfully Created.'));
    }
public function store ( CommunicationEquipmentRequest $ request ) { $ this -> validate ( $ request , [ 'serial_number' => 'required|unique:c4s_equipment,serial_number' , 'unitcode' => 'required' , 'pamu' => 'required' , 'status' => 'required' , 'specification' => 'required' , 'nomenclature_id' => 'required' , ] ) ; $ equipments = CommunicationEquipment :: create ( [ 'serial_number' => $ request -> input ( 'serial_number' ) , 'unitcode' => $ request -> input ( 'unitcode' ) , 'pamu' => $ request -> input ( 'pamu' ) , 'status' => $ request -> input ( 'status' ) , 'specification' => $ request -> input ( 'specification' ) , 'remarks' => $ request -> input ( 'remarks' ) , 'date_acquired' => $ request -> input ( 'date_acquired' ) , 'cost_acquired' => $ request -> input ( 'cost_acquired' ) , 'nomenclature_id' => $ request -> input ( 'nomenclature_id' ) , ] ) ; return redirect ( ) -> route ( 'c4s equipment - create' ) -> withStatus ( __ ( 'C4s Equipment Successfully Created.' ) ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .