SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #7 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'dropship_automation.expenses.expense_date' which is n
ot functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by (SQL: select user_id, expense_category_id, vendor, item, cost, recurring_inte rval, expense_date from expenses group by user_id, expense_category_id, vendor, item, cost, recurring_interval)

My google searches have brought me to the deduction that I need some kind of join (but don't let that bias your answers). How would I go about doing this?

I would like to present multiple thumbnail images on a Laravel blade view. Each thumbnail, when clicked, opens a modal. Each modal would have code to adjust (crop, flip, rotate) that image. I am able to implement this for the first image, however the image adjuster code for the remaining images do not execute. Here's my code:

I have a form that a user chooses a category from a category tree. The external API I'm using requires separate calls to their API based on the parent categories.

The way I'm handling this right now is a <select>' tag that contains options for the top level parent categories. The' submits the form onchange which sends a GET request to the API to retrieve the children categories based on the selected parent. This continues to happen with subsequent parent/children until I've reached my leaf category.

I have that working and it seems to be working fine. However my code is a mess. It's almost impossible to add other form elements to the page. The other downside is that the user experience isn't as nice as I'd like as the page has to reload every time the user selects a parent category.

Is AJAX the best answer? I have no knowledge of AJAX, before I sit down and learn it, I'd like some feedback to this idea.

In my homestead development environment I see the flash message. However in production, the flash message does not appear when the user sets their timezone.

The only thing I can think of, is that I was running the 2.x version of laracasts/flash and had previously updated to 3.0. But I ran composer update on my production server and verified that the 3.0 version of laracasts/flash was installed. So that can't be it right?

I attempted to use Laravel's built-in flash component by modifying the above code to this:

@tekmi Thank you and yes I watched those episodes when I was starting out with Laravel. Back then, it didn't make sense because I was so new. I watched it again today and it made more sense. So thank you for your guidance.

I made a few adjustments based on those videos and I now get this when I run dd(App::make('App\ResponseErrorHandler'));:

I have a model that sends requests to an outside API. When this outside API is unable to process the request, it responds with a failure along with an error code and an error message.

My model checks the response for these failures and then throws an exception with a generic message. My controller then catches this exception and flashes that generic message to the user.

I would like to handle each failure depending on the error code that is returned. (i.e. if the app receives error code "12345" then the app flashes "This sample error message" to the user. If the app receives error code "54321", then the app redirects to a specific view).

The most basic way I have in mind to accomplish this is to use a switch statement and write the logic depending on the "case" (error code). However, this outside API has hundreds of different types of error codes, so this can make my model messy really quick.

So my next thought was to create a helper class or a helper function to remove all of this logic from my model. But is this really the cleanest way to do it?

What is the right way to handle this? Does Laravel offer anything for this situation? Any help is appreciated...

if (!isset($response->Ack) || $response->Ack == 'Failure'){
session(['response' => $response->asXML()]);
throw new ReviseItemException('There was a problem updating the price for this item.');
}

$response is what an API returns whether successful with data I am requesting, or technical error codes and messages from the API.

I save it to a session so that I can log the technical API response. I throw a ReviseItemException with a general message for the user so that it is understandable for the user.

This all works great, no problems.

My question is: how do I get the technical API response from a scheduled artisan command for logging purposes? When a ReviseItemException is thrown, the $response variable is no longer available to the scheduled artisan command.

One option is to output $response to the ReviseItemException message, but the problem with this is that the user will not get a generic understandable message.

I have a database that I want to update every hour from an outside source (through the use of their API). I'm thinking of creating an artisan command with logic to retrieve information via the API and update into my database. Then use the scheduler in Laravel to trigger this custom artisan command every hour. Is this the right way to do this? Is there a better way? Any help in pointing me in the right direction is appreciated...

Well, I took my non-Spark Laravel app.css and overwrote the app.css in Laravel Spark and the result was no styling whatsoever. So there goes that idea. I also looked at my non-Spark app.css and the styling for the .thumbnail background was also gray there too and same problems with the btn-warning. So is Laravel Spark not entirely pulling from app.css?

I found the .thumbnail and btn-warning styling in app.css and changing them worked. But now, it makes me wonder what else is off. Would it be safe to take the app.css from my non-Spark install of Laravel and overwrite my Laravel Spark's app.css?

Also what do you mean by "my template css"? Is this your app.css? And what do you mean by "Spark default"? Is this Spark's version of app.css?

In my Laravel 5 installation the thumbnail background is white. But in the Laravel Spark installation, the thumbnail background is gray.

Furthermore, the btn-warning button is yellow/green when it's supposed to be orange. There's no problems with the other buttons such as btn-primary and btn-success --- these buttons have blue and green styling respectively.

However, it doesn't go into detail on when the exception handler is used. Currently I am creating custom exceptions in App/Exceptions then I Use App/Exceptions/CustomException in my controller that has try/catch blocks.

It might be worth mentioning that I am using Laravel Spark. I know there are some differences there, but I have checked and double checked. This has really stumped me. Anyone have any idea on what I'm doing wrong?

Why is it not finding SetTimezone from App\Http\Requests? I am looking at the folder structure and clearly I have a SetTimezone.php in the App/Http/Requests folder. Any help would be appreciated. Thanks!