baktinurwahyudin

function store

May 27th, 2017
635
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.33 KB | None | 0 0
  1.  
  2.     public function store(KaryawanRequest $request)
  3.     {
  4.       $input = $request->all();
  5.       // uploads foto
  6.       if($request->hasFile('foto')){
  7.       $input['foto']= $this->uploadFoto($request);
  8.       }
  9.       Karyawan::create($input);
  10.       Session::flash('pesan','s_simpan');
  11.       return redirect('karyawan');
  12.     }
Advertisement
Add Comment
Please, Sign In to add comment