Laravel 5.5 Google OAuth authentication using Socialite Package (Legacy People API has not been used in project)

Im trying to add google authentication for my application which built with laravel 5.5 with Laravel Socialite. So for that I have created a google developer account via google developer console and enabled google+ api. So when I try to register when it redirect to call back url it gives me below error. I have…

Laravel data dependent on selected dropdown

Been trying to dynamically change the value of an input field depending on the product selected from a dropdown menu for an hour now and I can’t seem to figure out how. This is how I populate the products: <select name=”product_id” v-model=”form.product_id” id=”product_id” class=”form-control” :class=”{‘is-invalid’: form.errors.has(‘product_id’) }”> <option v-for=”product in products” :value=”product.product_id”></option> </select> and this…

Laravel how do you bind parameters to a query in query builder DB raw inside another query

I have two queries that i’m building: $color = \DB::table(‘colors’)->take(10)->orderBy(‘id’, ‘desc’); if(isset($between)){ $color->whereBetween(‘id’, [$start, $end]); } $flavor = \DB::table(\DB::raw(‘(‘ . $color->toSql() . ‘) as color’)) ->join(‘flavor’, ‘flavor.color_id’, ‘=’, ‘color.id’) ->select(‘color.id’, ‘color.name’, ‘flavor.name’); return $flavor->get(); I need to bind 2 values in the first query only IF there is a $between set. And it has to…

Laravel WebSockets deployed: connection works, but subscribing to channels does not

Software: Laravel 5.8 Laravel WebSockets 1.1 Vue 2.6.10 Webserver: Debian 8 Plesk LetsEncrypt certificate In websockets.php (complete file) I have my local_cert and local_pk setup with my lets encrypt certificates. If I leave this option blank I cannot even connect. I also have set verify_peerto false, because if I don’t I cannot connect either. LARAVEL_WEBSOCKETS_SSL_LOCAL_CERT=/usr/local/psa/var/modules/letsencrypt/etc/live/website.com/fullchain.pem…

How can I optimize my Laravel controller to avoid 504?

I’m trying to push around 3,000 items into a table – I’m not sure if its possible but I feel my controller could reach that level with some optimizations. It’s currently taking 60+ seconds and timing out. if ($request->has(‘items’)) { $queueData = []; foreach ($request->get(‘items’) as $item) { if ( QueueItem::where(‘item’, $item)->exists() || QueueItemFailed::where(‘item’, $item)->exists()…