Exemplo n.º 1
0
 /**
  * Get user collection.
  *
  * @param  int  $id
  * @return Illuminate\Support\Collection
  */
 public function edit($id)
 {
     $profile = $this->profile->find($id);
     //dd($profile);
     return compact('profile');
 }
Exemplo n.º 2
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy(DeleteRequest $request, $id)
 {
     //dd('destroy');
     //		$this->profile->destroy($id);
     $profile = Profile::find($id);
     //		$profile->roles()->detach();
     $profile->delete();
     //		$this->user->destroy($id);
     //		return redirect('user')->with('ok', trans('back/users.destroyed'));
     Flash::success(trans('kotoba::account.success.delete'));
     return redirect('profiles');
 }
Exemplo n.º 3
0
 /**
  * @param $data
  * @return static
  */
 public function DeleteProfile($data)
 {
     //dd($data);
     $check = $this->checkProfileExists($data->email);
     $profile_id = $this->getProfile($data->id);
     //dd($profile_id);
     if ($check != null) {
         $profile = Profile::find($profile_id);
         //dd($profile);
         $profile->delete();
         return;
     }
 }