So if you have a Laravel + Vue app that you deploy to Heroku, and you want Heroku to run the NPM and Webpack build scripts, here is what you do. Make sure you have Node.js bundle in your instance. You can do this through the CLI or manually in the settings page Add build … Read more
If you are using Ionic + Android Studio to publish an app and run into this error on upload, “You need to use a different package name because “io.ionic.starter” already exists in Google Play”, do this. Check build.gradle (Module:android.app) file in Gradle Scripts Change the applicationId to a unique ID. The nomenclature is typically “appname.yoursite.com” … Read more
The Ionic framework team launched a Vue version recently and I have been testing it out. I made a prototype application and it was quite challenging to get started. The problem is that the documentation is written from the perspective of an Ionic developer instead of a Vue developer learning Ionic. Moreover, some of the … Read more
The documentation from Ionic and Capacitor doesn’t make it clear how to instantiate the Plugin import within Vue. Most of the documentation is either React or Angular. So it looks like you have to create an async method to call the plugin’s method and return the desired info.
I like to use select statements to return specific columns. But I was happy to find out that you can alias your columns just like in sql. Which can be make things a breeze, depending on what you are doing. Remember to use the dot syntax to specify a table for joined columns with the … Read more
If you want to know how many times your Laravel query is hitting the database you can use this snippet by @Tarasovych from StackOverflow. Pretty handy!
Various ways to set value if the value does not exist in PHP. The whole discussion summarized nicely at the end by @ben221199:
The Problem Do you see a json ajax response instead of the page you were expecting when hitting the back button? This can happen if you use the the same routes for your html and ajax like so. The problem is that the browser (depending on the browser) decides to cache data that is passed … Read more
This is a shoutout to Laravel’s Query Builder method distinct(). I feel sad and embarrassed that I didn’t know about it sooner. There are a lot of instances where I need to get a column’s unique values. And instead of using groupBy() and wasting a lot of resources. You can use distinct(), which will search … Read more