Exemplo n.º 1
0
 public function store(RegisterRequest $request)
 {
     $user = new User();
     $user->username = $_POST['username'];
     $user->password = $_POST['password'];
     $user->level = "karyawan";
     $user->save();
     $profile = new Profile();
     $profile->nama = $_POST['nama'];
     $profile->alamat = $_POST['alamat'];
     $profile->telpon = $_POST['telpon'];
     $profile->user_id = $user->id;
     $profile->save();
     return redirect(url("/users"));
 }
Exemplo n.º 2
0
 public function contact()
 {
     return view("LatifaUser::profile.contact", ['profile' => Profile::all()]);
 }