Monthly archives: April, 2019

Install Larvel telescope for dev env

$ composer require laravel/telescope –dev Problem 1 – phpoffice/phpspreadsheet 1.5.2 requires ext-zip * $ sudo port install php72-zip   Problem 1 – dompdf/dompdf v0.8.2 requires ext-gd * $ sudo port install php72-gd php artisan telescope:install php artisan migrate php artisan telescope:publish After running telescope:install, you should remove the TelescopeServiceProvider service provider registration from your app configuration file. Instead, manually register …

How to fix _this.props.dispatch is not a function in React.JS

When you got error _this.props.dispatch is not a function, you can try below things: 1) Convert the (handleSubmit) function to an arrow function so in that case, it won’t have its own this. handleSubmit = (user) => { // …logic here } 2) Create a constructor inside the component and do the next step: this.handleSubmit = this.handleSubmit.bind(this) …

ReactJS support IE11/IE10/IE9/IE8

@php $ua = htmlentities($_SERVER[‘HTTP_USER_AGENT’], ENT_QUOTES, ‘UTF-8’); if (preg_match(‘~MSIE|Internet Explorer~i’, $ua) || (strpos($ua, ‘Trident’) !== false )) { //echo ‘<h3>Only for IE</h3>’ . $ua; echo'<script src=”https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/7.4.0/polyfill.min.js”></script>’; } @endphp

Sass .scss: Nesting and multiple classes? eg. div.myClass

use the parent selector reference &, it will be replaced by the parent selector after compilation: // override the text on the banner $banner-text-height : 125px; $anchor-hero-height : 75px; .hero-new-section { height: 300px; // default height and can be reset at back-end margin-bottom: $banner-text-height; background-position: 50% 50%; .new-hero-card { width: 100%; height: $banner-text-height; bottom: -$banner-text-height; …