Recently, We are building a software for those with speech problems. We have used Electron.js for this software.
Specially, ElectronReact boilerplate made easier to getting started with electron.js. ElectronReact provides auto updater with their boilerplate.
It gives github provider to auto-update new version releases.
You just have to configure in
package.json.Github token is require to upload on Github repo. Check below screenshot.
So, We wanted to use redux in Next.js project. Setup is easy but after redux setup, “getInitialProps” method stopped working for pages.
We did research on that and found out solution for it. Basically, we had to overwrite “App” component from Next.js.
To overwrite “App” component from Next.js, you would require to create “_app.js” file. Here it is.
getInitialProps method should call and you’ll get store in the method. Checkout index.js page.
Cool, now you you can leverage the power of redux and next.js both in our Next application.🔥🔥🔥
If you enjoyed reading this blog post, please click on the clap button below! ❤️👇
Why do you need Laravel Mix?
Let’s suppose you want to run your app on local sub-domain like http://dev.example.com for development, and you only want to
watchthe file changes, without necessarily using hot reloading. The
create-react-app (https://github.com/facebook/create-react-app) does not provide ability to
watchchanges. It is the perfect case where you can use
Laravel Mix .
Let’s see how to setup React with hot reloading using Laravel Mix.
npm install --save-dev react…
In PHP 7.x, now we have phthread extension available to create a new thread and divide your long task in multi thread to complete it faster.
But what if you don’t have phthread extension on your server?
You will find your question answered here!
You can spawn multi processes, also know as parallel processes to complete a long task. For example, you want to send bulk 100k+ emails from application, this is the best case where you can use multi processing with PHP.
There is a component(library) “The Process Component” in Symfony which you can utilised in your PHP project…
Music is an expressive form of art, an accessible vibe no matter wherever you are! It is an entertaining resource to optimize the boring. 🎵
Speaking of which, let me ask y’all, If you can spare a minute out of your tasks to write me a line or two about your Thoughts on “Music & Productivity”?
— How exactly does music help boost your mood and enhance your performance?
— Does it help push us to be more efficient at workplace? 🤔
I carried out a fun one minute task for my colleagues, asking them the same question. …
Semantic UI is a front-end development framework that is used to create beautiful, responsive layouts using easy-looking HTML.
Recently in one of our clients’ projects, we required to use Semantic UI + LESS with React. I will try to describe here what we did.
Let’s create a React project first.
npm create react-app my-app
Now let’s add Semantic UI with .less files.
First, add gulp.
npm install -g gulp
Install Semantic UI with npm
npm install semantic-ui --save-dev
It will ask which components you want to install. Check below screen.
Choose first option “Automatic (Use default…
dd() function seems to have stopped working properly in latest Chrome. The dump does not render output properly. It looks like below:
I found a workaround here. Seems Chrome renders errors as HTML. To use this workaround in Laravel, just create a helper function and include in
> helpers.php (your_project/helpers.php)
Then run the command:
That’s it! Now use
_dd($data) function instead of
Any questions or suggestions? please comment!
Sometimes we require to do bulk insert/update/delete operation in database, or chained database operations, and if any exception occurs at any step, it should not perform any database operation in the chain.
“Transactions” gives us power to commit a group of database operations, like bulk insert, or rollback the entire transaction if any error occurs.
Laravel provides very easy API for Transaction. Recently, we needed to parse multiple CSV files having around 50k records each, where it should delete all records first and then insert all records in database.
Recently, while we were developing a new Laravel package, we wanted to check and ensure that everything works as expected in an “actual” Laravel project.
While developing the package, we need a quick way to check functionality.
To do so, follow below steps:
1) Add your package in Laravel project: Let’s name it “mypackage”, add it to root directory of your project.
2) Add package “repositories” block in your composer.json. For general information on how to declare repositories, please refer to the composer documentation.
It is generally advisable to download a file with a url call, or submitting a form, instead of with Ajax. Because Ajax can not handle file downloads from server.
However, in case we still need to do it, we can use Blob.
In this post, we will see how to download a CSV file using Ajax / HTTP Service call in Angular 4.
The TypeScript code:
let postData = [