app/Http/Controllers/SupplierController.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)
    {
        $data = new Supplier();
        $data->name = $request->nama;
        $data->address = $request->alamat;
        $data->save();
        return redirect()->route("supplier.index")->with("status", "Supplier is added!");
    }
public function store ( Request $ request ) { $ data = new Supplier ( ) ; $ data -> name = $ request -> nama ; $ data -> address = $ request -> alamat ; $ data -> save ( ) ; return redirect ( ) -> route ( " supplier.index " ) -> with ( " status " , " Supplier is added! " ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .
// $data->name = $request->get('nama'); // $data->address = $request->get('alamat');