jrock2004

Experience

2,380

0 Best Reply Awards

  • Member Since 2 Years Ago
  • 32 Lessons Completed
  • 0 Favorites

23rd March, 2017

jrock2004 left a reply on Syntax Error Or Access Violation • 1 month ago

Would would I need to group? You do not need for that for SQL

jrock2004 started a new conversation Syntax Error Or Access Violation • 1 month ago

Trying to get some data for a dashboard page I am building. I am not sure why I am getting this error

       $appData = App::orderBy('id', 'desc');¬                                                                                                                          
           $appCount = $appData->count();¬                                                                                                                                  
           $appTops = $appData->take(2)->get();¬                                                                                                                            
           $providerData = Provider::orderBy('id', 'desc');¬                                                                                                                
           $providerCount = $providerData->count();¬                                                                                                                        
           $providerTops = $providerData->take(2)->get();¬                                                                                                                  
           $showData = Show::orderBy('id', 'desc');¬                                                                                                                        
           $showCount = $showData->count();¬                                                                                                                                
           $showTops = $showData->take(2)->get();¬                                                                                                                          
                                                                                                                                                                          
          return view('admin.index', compact(¬                                                                                                                             
              'appCount',¬                                                                                                                                                 
              'appTops',¬                                                                                                                                                  
              'providerCount',¬                                                                                                                                            
              'providerTops',¬                                                                                                                                             
              'showCount',              
              'showTops'          ));

Here is the error I am getting

SQLSTATE[42000]: Syntax error or access violation: 1140 Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause (SQL: select count(*) as aggregate from `apps` order by `id` desc)

22nd March, 2017

jrock2004 left a reply on Upload Project Laravel • 1 month ago

I really wish this was told in the beginning of downloading the project of website. Not every company I work with does VPS

20th March, 2017

jrock2004 left a reply on Routes File Redirect • 1 month ago

Mods, please delete. I forgot to add return in front of redirect

jrock2004 started a new conversation Routes File Redirect • 1 month ago

I am trying to figure out in the routes file how I can redirect based based off an if statement

// Auth Routes
Auth::routes();

if (!env('ALLOW_REGISTRATION', false)) {
    Route::any('/register', function() {
        redirect('/home/index');
    });
}

// Home Controller
Route::get('/', [email protected]');

Right now what happens is I get a blank page. Maybe I should just 404 since I am trying to hide that route?

jrock2004 left a reply on AppServiceProvider Giving Me Non-object • 1 month ago

@SaeedPrez Sorry about that

jrock2004 left a reply on AppServiceProvider Giving Me Non-object • 1 month ago

Thank you all guys. Still learning Laravel and now I know where to look

jrock2004 left a reply on AppServiceProvider Giving Me Non-object • 1 month ago

I figured it out. @Snapey got me looking and the compiled files. The problem was the else statement was being fired because of this code change causing the else to be rendered. The else code is expecting the user to be logged in

jrock2004 left a reply on AppServiceProvider Giving Me Non-object • 1 month ago

@Snapey

This is line 49

<?php echo e(Auth::user()->name); ?> <span class="caret"></span>

jrock2004 left a reply on AppServiceProvider Giving Me Non-object • 1 month ago

@Snapey Looking at those line I am not understanding the filename in 087bb77ee1021a12882b9d85d430c19f0d6eafd5.php line 49 There is no such file

jrock2004 left a reply on AppServiceProvider Giving Me Non-object • 1 month ago

@vipin93 How would this help me for sending a variable to a layout?

jrock2004 left a reply on AppServiceProvider Giving Me Non-object • 1 month ago

@SaeedPrez Nope, still same result

19th March, 2017

jrock2004 left a reply on AppServiceProvider Giving Me Non-object • 1 month ago

@SaeedPrez

Still same result

jrock2004 left a reply on AppServiceProvider Giving Me Non-object • 1 month ago

@SaeedPrez The code will work if I take out the && $isUserRefEnabled. I took a screenshot and posted link in OP. I even too the config part out of the AppServiceProvider and I still get the error

jrock2004 left a reply on AppServiceProvider Giving Me Non-object • 1 month ago

I have updated the question with more information to help

18th March, 2017

jrock2004 started a new conversation AppServiceProvider Giving Me Non-object • 1 month ago

I am trying to add a variable to the AppServiceProvider to pass to the view and I am getting the error of Trying to get property of non-object

public function boot() { view()->composer('shared.nav', function($view) { $view->with('isUserRegEnabled', config('app.ALLOW_REGISTRATION', false)); }); }

If I var_dump the config here, its return me a boolean of FALSE. Not sure what I am doing wrong

Edit Your Profile
Update

Want to change your profile photo? We pull from gravatar.com.