app/Http/Controllers/UserController.php
// add wehere to send gems view
add wehere to send gems view
add wehere to send gems view
public function addAccountWhereToSendGemsView(){
        if($this->isNotAdmin()){
            if($this->isApproved()){
                $main = MainAccounts::where('user_id', Auth::id())->count();
                if($main == 4){
                    $accountSendGems = AccountWhereToSend::where('user_id', Auth::id())->count();
                    if($accountSendGems >= 1){
                        return redirect(route('user.dashboard'))->with('error', 'You already have one');
                    }
                    return view('userpanel.add_where_to_send_gems');
                }
                return redirect(route('user.dashboard'))->with('error', 'Opsssss! Something went wrong');
            }
            return $this->isNotApproved();
        }
        return abort(404);
    }
public function addAccountWhereToSendGemsView ( ) { if ( $ this -> isNotAdmin ( ) ) { if ( $ this -> isApproved ( ) ) { $ main = MainAccounts :: where ( 'user_id' , Auth :: id ( ) ) -> count ( ) ; if ( $ main == 4 ) { $ accountSendGems = AccountWhereToSend :: where ( 'user_id' , Auth :: id ( ) ) -> count ( ) ; if ( $ accountSendGems >= 1 ) { return redirect ( route ( 'user.dashboard' ) ) -> with ( 'error' , 'You already have one' ) ; } return view ( 'userpanel.add_where_to_send_gems' ) ; } return redirect ( route ( 'user.dashboard' ) ) -> with ( 'error' , 'Opsssss! Something went wrong' ) ; } return $ this -> isNotApproved ( ) ; } return abort ( 404 ) ; }
add wehere to send gems view
add wehere to send gems view