title: getting SQLSTATE[42000] error when i try to fill a dynamic dropdown
body: <p>I'm trying to fill 3 dynamic drop-down menus to filter images from a catalog. </p>
  
  <p>I need to filter them by emotion(emocion in Spanish within my code) which they are only 3 happiness, anger and sadness(alegria, ira, tristeza)each of those categories can have 3 levels of intensity like high, medium and low (Alto, medio, bajo).</p>
  
  <p>So then for example when you select <code>anger+level of activation</code>(it has to be only in that order, meaning emotion should be first always) it should fill the third <code>drop-down</code> with images of those specifications.</p>
  
  <p>My table  <code>Emocion</code>  in my data base has only 2 columns <code>id</code> and <code>emocion</code> and has the 3 emotions registered. </p>
  
  <p>I tried adding this line <code>Schema::defaultStringLength(191);</code>on <code>app/Providers/AppServiceProvider.php</code>but it wont work and i tried
  in <code>config\database.php</code> -->   <code>"mysql"</code>array 
  Set <code>'strict' =&gt; false</code> to disable all.</p>
  
  <p>For now im just trying to fill the first drop-down from my database.</p>
  
  <p>Here is the code of my controller:</p>
  
  <pre><code>&lt;?php
  
  namespace App\Http\Controllers\Admin;
  
  use Illuminate\Http\Request;
  use App\Http\Controllers\Controller;
  use App\User;
  use DB;
  class PlantillaImagenesController extends Controller{
  
      public function index()
      {
              $emocion_list =  DB:: table('Emocion')
                                  -&gt;groupBy('Emocion')
                                  -&gt;get();
               return view ('admin.Imagen.index')-&gt;with('users', User::all())-&gt;with('emocion_list', $emocion_list);
      } 
  
  }
  </code></pre>
  
  <p>And here is my first 2 drop-downs :</p>
  
  <pre><code>
  &lt;div class="input-group mb-3"&gt;
      &lt;div class="input-group-prepend"&gt;
          &lt;label class="input-group-text" for="inputGroupSelect01"&gt;Emocion&lt;/label&gt;
      &lt;/div&gt;
      &lt;select name="emocion"class="custom-select input-lg dynamic"  id="emocion" data-dependent = "intensidad"&gt;                                                    
          &lt;option value=""&gt;Selecciona Emocion&lt;/option&gt;
          @foreach ($emocion_list as $emocion )
              &lt;option value="{{ $emocion-&gt;emocion }}"&gt;{{$emocion-&gt;emocion }}&lt;/option&gt;
          @endforeach
      &lt;/select&gt;
      &lt;/div&gt;
  
  
  
      &lt;div class="input-group mb-3"&gt;
      &lt;div class="input-group-prepend"&gt;
          &lt;label class="input-group-text" for="inputGroupSelect01"&gt;Intensidad&lt;/label&gt;
      &lt;/div&gt;
      &lt;select name="intensidad" class="custom-select" id="intensidad" data-dependent = "imagen"&gt;                                                    
  
      &lt;/select&gt;
      &lt;/div&gt; 
  </code></pre>
  
  <p>and my route file :</p>
  
  <pre><code>Auth::routes();
  
  
  Route::get('/home', 'HomeController@index')-&gt;name('home');
  
  Route::namespace('Admin')-&gt;prefix('admin')-&gt;middleware(['auth',  'auth.admin'])-&gt;name('admin.')-&gt;group(function(){
      Route::resource('/ImagenAudioVideo',  'PlantillaController', ['except' =&gt; ['show', 'create', 'store'] ]);
      Route::get('/Imagen',  'PlantillaImagenesController@index'); // &lt;--------------------------&gt;this one
      Route::resource('/Audio',  'PlantillaAudiosController', ['except' =&gt; ['show', 'create', 'store'] ]);
      Route::resource('/Video',  'PlantillaVideosController', ['except' =&gt; ['show', 'create', 'store'] ]);
      Route::resource('/ImagenAudio',  'PlantillaImagenesAudioController', ['except' =&gt; ['show', 'create', 'store'] ]);
      Route::resource('/EditarUsuario',  'EditarUsuariosController', ['except' =&gt; ['show', 'create', 'store'] ]);
      Route::get('/', function () {
      return view('home');
  });
  
  });
  </code></pre>
  
  <p>im getting this error:</p>
  
  <blockquote>
    <p>SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'configiem.Emocion.IdEmocion' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by (SQL: select * from <code>Emocion</code> group by <code>Emocion</code>)</p>
  </blockquote>