Laravel

Laravel – Speed of Running Eloquent

If you call repeatedly relationship model attributes, it will affects to response speed. Because laravel will connect database and tables whenever you call relationship model attributes. So, in this case, you must build one SQL for getting all available attributes from all relationship models. For example: @foreach ($posts as $post) {{ $post->author->fullName }}@endforeach This is …

Blockchain Discussion

Web3.js 1.0 Transaction Receive Issue

After deploying a new contract I never receive a receipt object. Expected behavior Receiving a contract object containing the address of the new contract in .on (‘receipt’, …. Actual behavior Nothing happens (also no error). On my node I can look up the contract address manually.The contract gets created. Versions web3.js: 1.0.0-beta.51 (latest) metamask: 6.3.0 (latest) browser: Chromium ethereum node: instance: Geth/v1.8.23-stable-c9427004/linux-amd64/go1.11. Solution …

Discussion

Highlight specific words in textarea

I had a chance that I need to highlight some invalid characters that users input in <textarea/> tag. At first glance, I thought I could wrap all individual letters inside of <span> tag but I realized that textarea tag cannot contain any other child tags. I researched some solution and found this nice plugin. https://github.com/lonekorean/highlight-within-textarea …

DevOps Discussion

Do you know why this happens?

I can not access to https://dev-local.mylogobot.com Do you know why? This is my vhost file. <VirtualHost *:443>     DocumentRoot “/Volumes/Data/Amchara/main-front/public”     SSLEngine on     SSLCertificateFile /etc/apache2/ssl/amchara-front/server.crt     SSLCertificateKeyFile /etc/apache2/ssl/amchara-front/server.key     ServerName www.dev-local.amchara-front.net     ServerAlias dev-local.amchara-front.net     <Directory “/Volumes/Data/Amchara/main-front/public”>         AllowOverride All         …

Discussion Javascript

Lerna

Lerna is a tool that optimizes the workflow around managing multi-package repositories with git and npm. Lerna can also reduce the time and space requirements for numerous copies of packages in development and build environments – normally a downside of dividing a project into many separate NPM package. See the hoist documentationfor details.