Chron

Chron

Member Since 11 Months Ago

Experience Points
12,520
Total
Experience

2,480 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed
26
Lessons
Completed
Best Reply Awards
0
Best Reply
Awards
  • start-engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-session Created with Sketch.

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • subscriber-token Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • lara-evanghelist Created with Sketch.

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • chatty-cathy Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

Level 3
12,520 XP
Dec
10
4 days ago
Activity icon

Started a new Conversation Are There Any Free Cross Browser Testing Tools?

I've tried browsershots.org but it is hard to sign up.

Dec
06
1 week ago
Dec
05
1 week ago
Activity icon

Replied to Problem With Carousel In Svg In Chrome

@bugsysha @sinnbeck I don't have safari or IE because I'm using linux.

I manage to find the cause. It's the backface-visibility of the carousel, whenever I change it to unset, it renders the expected output. However, when the carousel is moving, the svg gets covered again for a second. Is there a way to fix this?

Here is the fiddle.

https://jsfiddle.net/SuperSudo/4oukcpv7/16/

Activity icon

Replied to Problem With Carousel In Svg In Chrome

But why is it working in firefox?

Activity icon

Replied to Problem With Carousel In Svg In Chrome

Yes, I did and it didn't work.

Activity icon

Started a new Conversation Problem With Carousel In Svg In Chrome

Here is the code:

https://jsfiddle.net/SuperSudo/4oukcpv7/6/

svg with carousel

In firefox, the person doesn't break and the carousel respect its position while in chrome, the carousel places itself on top of the z-axis.

Is there a way to fix this?

Dec
02
1 week ago
Activity icon

Awarded Best Reply on Svg Problem

Fixed it.

The mistake I did was grouping it before doing anything else. So it should be cropping and moving first, then grouping the svg.

Activity icon

Replied to Svg Problem

Fixed it.

The mistake I did was grouping it before doing anything else. So it should be cropping and moving first, then grouping the svg.

Dec
01
1 week ago
Activity icon

Replied to Svg Problem

@amaury I was trying to move the person closer to the rectangular object but when I animate it, it goes back to the first position.

Activity icon

Replied to Svg Problem

@snapey If you have some time, you could look at this.

<!DOCTYPE html>
<html>
<head>
<style>
#person {
animation: breathe 1s ease-in-out infinite alternate;
transform-origin: bottom;
transform-box: fill-box;
}
@keyframes breathe {
    to {
transform: rotateX(15deg);
    }
}
</style>
</head>
<body>
<div>
<svg
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:cc="http://creativecommons.org/ns#"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:svg="http://www.w3.org/2000/svg"
   xmlns="http://www.w3.org/2000/svg"
   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
   id="b904b1fc-2438-4085-8361-d165edf61501"
   data-name="Layer 1"
   width="1016.04774"
   height="688.3355"
   viewBox="0 0 1016.04774 688.3355"
   version="1.1"
   sodipodi:docname="vid.svg"
   inkscape:version="0.92.4 5da689c313, 2019-01-14">
  <metadata
     id="metadata1338">
    <rdf:RDF>
      <cc:Work
         rdf:about="">
        <dc:format>image/svg+xml</dc:format>
        <dc:type
           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
      </cc:Work>
    </rdf:RDF>
  </metadata>
  <defs
     id="defs1336" />
  <sodipodi:namedview
     pagecolor="#ffffff"
     bordercolor="#666666"
     borderopacity="1"
     objecttolerance="10"
     gridtolerance="10"
     guidetolerance="10"
     inkscape:pageopacity="0"
     inkscape:pageshadow="2"
     inkscape:window-width="1366"
     inkscape:window-height="747"
     id="namedview1334"
     showgrid="false"
     inkscape:snap-center="true"
     inkscape:zoom="0.79612339"
     inkscape:cx="441.55342"
     inkscape:cy="434.28059"
     inkscape:window-x="0"
     inkscape:window-y="0"
     inkscape:window-maximized="0"
     inkscape:current-layer="b904b1fc-2438-4085-8361-d165edf61501" />
  <title
     id="title1251">tutorial_video</title>
  <rect
     y="12.305671"
     width="706.02344"
     height="412.69434"
     id="rect1299"
     x="0"
     style="fill:#3f3d56;stroke-width:1.23202837" />
  <rect
     x="35.419235"
     y="380.00217"
     width="643.44946"
     height="16.713478"
     id="rect1301"
     style="fill:#d0cde1;stroke-width:1.23202837" />
  <rect
     x="35.419235"
     y="380.00217"
     width="370.72134"
     height="16.713478"
     id="rect1303"
     style="fill:#6c63ff;stroke-width:1.23202837" />
  <polygon
     points="29.974,362.437 50.36,371.412 30,380.445 "
     id="polygon1305"
     transform="matrix(1.1806412,0,0,1.2856521,0,-121.40215)"
     style="fill:#6c63ff" />
  <rect
     x="73.199753"
     y="344.00391"
     width="8.2644882"
     height="23.141739"
     id="rect1307"
     style="fill:#6c63ff;stroke-width:1.23202837" />
  <rect
     x="89.728737"
     y="344.00391"
     width="8.2644882"
     height="23.141739"
     id="rect1309"
     style="fill:#6c63ff;stroke-width:1.23202837" />
  <path
     d="M 667.0623,333.7187 H 38.961161 V 49.589582 H 667.0623 Z M 41.322443,331.1474 H 664.70101 V 52.160887 H 41.322443 Z"
     id="path1311"
     inkscape:connector-curvature="0"
     style="fill:#d0cde1;stroke-width:1.23202837" />
  <ellipse
     cx="354.19238"
     cy="193.58263"
     id="circle1313"
     rx="55.490139"
     ry="60.425648"
     style="fill:#6c63ff;stroke-width:1.23202837" />
  <rect
     x="421.51709"
     y="148.80048"
     width="70.83847"
     height="2.5713043"
     id="rect1315"
     style="fill:#d0cde1;stroke-width:1.23202837" />
  <rect
     x="210.18231"
     y="250.36699"
     width="70.83847"
     height="2.5713043"
     id="rect1317"
     style="fill:#d0cde1;stroke-width:1.23202837" />
  <path
     d="m 518.32968,161.65698 a 10.625771,11.570869 0 1 1 10.62577,-11.57086 10.637766,11.583931 0 0 1 -10.62577,11.57086 z m 0,-20.57043 a 8.2644886,8.9995648 0 1 0 8.26449,8.99957 8.2741463,9.0100814 0 0 0 -8.26449,-8.99957 z"
     id="path1319"
     inkscape:connector-curvature="0"
     style="fill:#d0cde1;stroke-width:1.23202837" />
  <path
     d="m 518.32968,276.08002 a 10.625771,11.570869 0 1 1 10.62577,-11.57087 10.637389,11.58352 0 0 1 -10.62577,11.57087 z m 0,-20.57043 a 8.2644886,8.9995648 0 1 0 8.26449,8.99956 8.2745241,9.0104928 0 0 0 -8.26449,-8.99956 z"
     id="path1321"
     inkscape:connector-curvature="0"
     style="fill:#d0cde1;stroke-width:1.23202837" />
  <path
     d="m 556.1102,276.08002 a 10.625771,11.570869 0 1 1 10.62577,-11.57087 10.637389,11.58352 0 0 1 -10.62577,11.57087 z m 0,-20.57043 a 8.2644886,8.9995648 0 1 0 8.26449,8.99956 8.2745241,9.0104928 0 0 0 -8.26449,-8.99956 z"
     id="path1323"
     inkscape:connector-curvature="0"
     style="fill:#d0cde1;stroke-width:1.23202837" />
  <path
     d="m 480.54916,276.08002 a 10.625771,11.570869 0 1 1 10.62577,-11.57087 10.637766,11.583931 0 0 1 -10.62577,11.57087 z m 0,-20.57043 a 8.2644886,8.9995648 0 1 0 8.26449,8.99956 8.2741463,9.0100814 0 0 0 -8.26449,-8.99956 z"
     id="path1325"
     inkscape:connector-curvature="0"
     style="fill:#d0cde1;stroke-width:1.23202837" />
  <path
     d="m 180.66629,263.2235 a 10.625771,11.570869 0 1 1 10.62577,-11.57087 10.637766,11.583931 0 0 1 -10.62577,11.57087 z m 0,-20.57043 a 8.2644886,8.9995648 0 1 0 8.26449,8.99956 8.2741463,9.0100814 0 0 0 -8.26449,-8.99956 z"
     id="path1327"
     inkscape:connector-curvature="0"
     style="fill:#d0cde1;stroke-width:1.23202837" />
  <path
     d="m 142.88577,263.2235 a 10.625771,11.570869 0 1 1 10.62577,-11.57087 10.637766,11.583931 0 0 1 -10.62577,11.57087 z m 0,-20.57043 a 8.2644886,8.9995648 0 1 0 8.26449,8.99956 8.2741463,9.0100814 0 0 0 -8.26449,-8.99956 z"
     id="path1329"
     inkscape:connector-curvature="0"
     style="fill:#d0cde1;stroke-width:1.23202837" />
  <rect
     x="517.14905"
     y="171.94221"
     width="2.3612823"
     height="64.282608"
     id="rect1331"
     style="fill:#d0cde1;stroke-width:1.23202837" />
  <g
     id="person"
     transform="translate(-66)">
    <path
       id="path1269"
       transform="translate(-91.97613,-105.83225)"
       d="m 777.726,710.54921 -32.83374,-2.91855 -14.59274,48.15614 c 0,0 -9.167,12.32809 -14.39321,23.87635 a 10.29346,10.29346 0 0 0 10.554,14.43894 c 9.91519,-1.096 21.86865,-3.18147 23.53947,-6.94084 a 159.69357,159.69357 0 0 0 5.83711,-16.78168 l 8.026,5.10747 5.8371,-2.91856 3.6482,-28.4559 c 0,0 6.56674,-7.29638 0.72963,-20.42987 z"
       inkscape:connector-curvature="0"
       style="fill:#2f2e41" />
    <path
       id="path1271"
       transform="translate(-91.97613,-105.83225)"
       d="m 904.68312,710.54921 -32.83373,-2.91855 -14.59277,48.15614 c 0,0 -9.167,12.32809 -14.39321,23.87635 a 10.29345,10.29345 0 0 0 10.554,14.43894 c 9.91519,-1.096 21.86864,-3.18147 23.53947,-6.94084 a 159.6961,159.6961 0 0 0 5.83711,-16.78168 l 8.026,5.10747 5.83711,-2.91856 3.64819,-28.4559 c 0,0 6.56675,-7.29638 0.72964,-20.42987 z"
       inkscape:connector-curvature="0"
       style="fill:#2f2e41" />
    <g
       id="g1414">
      <polygon
         points="680.642,617.121 689.398,587.206 661.672,576.991 644.89,642.658 649.998,647.766 "
         id="polygon1263"
         style="fill:#a0616a" />
      <polygon
         points="807.6,617.121 816.355,587.206 788.629,576.991 771.847,642.658 776.955,647.766 "
         id="polygon1265"
         style="fill:#a0616a" />
      <path
         d="m 893.73855,346.45961 -100.69012,18.241 -0.72963,9.4853 -45.96723,311.55559 c 0,0 53.26361,26.99663 87.55662,13.86314 l 13.86313,-215.24336 18.9706,215.24336 c 0,0 43.04867,22.61879 72.23421,-8.026 0,-3e-5 -18.24096,-327.60771 -45.23758,-345.11903 z"
         transform="translate(-91.97613,-105.83225)"
         id="path1267"
         inkscape:connector-curvature="0"
         style="fill:#2f2e41" />
      <circle
         cx="739.3783"
         cy="57.852921"
         r="36.481918"
         id="circle1273"
         style="fill:#a0616a" />
      <path
         d="m 828.80072,192.50589 c 0,0 8.026,21.88915 -2.18892,26.99662 a 99.33568,99.33568 0 0 1 -19.70023,7.29639 l 1.45927,33.56337 36.48193,48.88573 43.04867,-82.44914 c 0,0 -23.34843,6.56674 -26.99663,-45.23759 z"
         transform="translate(-91.97613,-105.83225)"
         id="path1275"
         inkscape:connector-curvature="0"
         style="fill:#a0616a" />
      <path
         d="m 765.32217,358.86346 -8.026,93.39373 c 0,0 -16.05205,55.45252 5.83711,48.88578 21.88916,-6.56674 10.21494,-51.80434 10.21494,-51.80434 l 19.70023,-90.47517 z"
         transform="translate(-91.97613,-105.83225)"
         id="path1277"
         inkscape:connector-curvature="0"
         style="fill:#a0616a" />
      <path
         d="m 842.66385,291.73672 -15.32241,-48.88578 -4.37783,5.10747 c 0,0 -24.409,-11.88526 -3.44886,-25.278 0,0 -46.16655,3.3889 -46.16655,17.98167 0,14.59277 20.42987,59.83035 20.42987,59.83035 0,0 -5.8371,67.12674 -2.18891,67.12674 3.64819,0 100.69011,-19.70024 100.69011,-19.70024 l 2.91855,-34.293 c 0,0 28.4559,-64.20819 20.42988,-74.42313 -8.02602,-10.21494 -36.13656,-16.8918 -38.49816,-14.6478 0,0 15.14973,12.45888 -24.25075,29.97021 l 2.91855,5.83711 z"
         transform="translate(-91.97613,-105.83225)"
         id="path1279"
         inkscape:connector-curvature="0"
         style="fill:#d0cde1" />
      <path
         d="m 776.99639,237.74347 c 0,0 -8.75566,8.026 -8.75566,30.64482 0,22.61882 -5.10747,68.586 -5.10747,68.586 l -8.026,26.267 29.91518,1.45928 8.75566,5.83711 c 0,0 11.67422,-80.98987 13.1335,-83.17879 1.45928,-2.18892 -29.91521,-49.61542 -29.91521,-49.61542 z"
         transform="translate(-91.97613,-105.83225)"
         id="path1281"
         inkscape:connector-curvature="0"
         style="fill:#d0cde1" />
      <path
         d="m 907.60168,237.01383 c 0,0 12.40385,-2.18891 14.59277,18.97061 2.18892,21.15952 3.64819,94.853 3.64819,94.853 0,0 10.21494,5.10747 5.10747,13.86313 -5.10747,8.75566 -10.94458,10.94458 -10.94458,10.94458 l -21.88915,-13.1335 -4.37783,-67.12674 z"
         transform="translate(-91.97613,-105.83225)"
         id="path1283"
         inkscape:connector-curvature="0"
         style="fill:#d0cde1" />
      <path
         d="m 902.49421,361.05238 c 0,0 -31.37446,13.13349 -26.99663,18.9706 4.37783,5.83711 15.32242,-1.45928 15.32242,-1.45928 0,0 11.67422,30.64482 18.241,24.07807 6.56678,-6.56675 10.94458,-32.10409 10.94458,-32.10409 z"
         transform="translate(-91.97613,-105.83225)"
         id="path1285"
         inkscape:connector-curvature="0"
         style="fill:#a0616a" />
      <path
         d="m 897.54208,346.45961 c 0,0 11.69906,-15.68723 28.20824,0 0,0 -17.47314,-7.66121 -28.20824,0 z"
         transform="translate(-91.97613,-105.83225)"
         id="path1287"
         inkscape:connector-curvature="0"
         style="opacity:0.2" />
      <path
         d="m 826.9116,170.46791 c -2.30395,-3.36495 -1.294,-8.04065 -2.943,-11.77055 -2.58934,-5.85711 -10.225,-7.059 -16.61735,-7.44428 -4.249,-0.25611 -8.562,-0.50757 -12.72716,0.34234 a 12.21959,12.21959 0 0 0 -8.67239,6.614 c -0.898,1.91571 -0.80345,-4.0207 -0.3832,-11.64847 a 36.81091,36.81091 0 0 1 27.42517,-33.60608 q 0.13443,-0.035 0.26644,-0.0689 c 7.72355,-1.97987 15.70015,-3.49242 23.63916,-2.75412 7.93901,0.7383 15.91256,3.96452 21.00462,10.1 2.32729,2.80418 4.00562,6.13677 6.59,8.706 4.54069,4.51406 11.147,6.03665 17.22989,8.03486 6.87948,2.25986 13.59067,5.426 18.92914,10.31831 5.33847,4.89231 9.20285,11.67995 9.4874,18.9155 0.33193,8.44016 -4.828,17.28372 -13.44211,19.158 a 9.71918,9.71918 0 0 0 -4.10672,1.89149 c -8.10847,6.60747 1.48064,13.08651 1.59,20.30129 0.0913,6.02023 -6.51421,10.10531 -12.52,10.53158 -11.18554,0.79392 -22.302,-7.60644 -24.5924,-18.58372 -1.026,-4.91757 -0.449,-10.00779 0.0199,-15.00932 0.53674,-5.72521 -12.083,-18.87 -3.72318,-9.21365 a 14.1348,14.1348 0 0 1 3.26323,6.46242 c 1.5423,7.83857 -5.55653,10.6597 -9.96792,15.13062 a 18.72208,18.72208 0 0 0 -4.064,19.37519 c -7.777,-6.32613 -9.85246,-18.6265 -4.58175,-27.15419 1.401,-2.26677 3.22871,-4.25356 4.55335,-6.5658 2.067,-3.608 2.47342,-11.35675 -3.54792,-10.9984 -4.29787,0.2557 -8.67946,3.94506 -12.10921,-1.06414 z"
         transform="translate(-91.97613,-105.83225)"
         id="path1289"
         inkscape:connector-curvature="0"
         style="fill:#2f2e41" />
      <rect
         x="736"
         width="20"
         height="60"
         rx="6.0944901"
         id="rect1291"
         y="0"
         style="fill:#d0cde1" />
      <circle
         cx="746"
         cy="69"
         r="18"
         id="circle1293"
         style="fill:#6c63ff" />
      <circle
         cx="746"
         cy="69"
         r="9"
         id="circle1295"
         style="fill:#d0cde1" />
      <circle
         cx="746"
         cy="69"
         r="4"
         id="circle1297"
         style="fill:#6c63ff" />
    </g>
  </g>
</svg>
</div>
</body>
</html>

If you remove the animation, you can see the prime position of the person, but it changes when it was animated.

Here is the svg:

https://svgshare.com/i/GWL.svg

Activity icon

Started a new Conversation Svg Problem

I'm using illustrations from unDraw.co with inkscape, I moved one object and try to animate it but it gets back to its first position. Am I doing it wrong?

Nov
26
2 weeks ago
Activity icon

Replied to Error Compiling Sass That Has Svg

Ohh, it works. Thanks!

Activity icon

Replied to Error Compiling Sass That Has Svg

It's still the same.

It stops when I remove this code:

background: url('image/banner.svg') no-repeat 0 0;
Activity icon

Replied to Error Compiling Sass That Has Svg

webpack.mix.js

const mix = require('laravel-mix');

/*
 |--------------------------------------------------------------------------
 | Mix Asset Management
 |--------------------------------------------------------------------------
 |
 | Mix provides a clean, fluent API for defining some Webpack build steps
 | for your Laravel application. By default, we are compiling the Sass
 | file for the application as well as bundling up all the JS files.
 |
 */

 mix
 .js('resources/js/app.js', 'public/js')
 .sass('resources/sass/app.scss', 'public/css');

 mix.webpackConfig({
    node: {
        fs: "empty"
    }
 });

Activity icon

Replied to Error Compiling Sass That Has Svg

It just says "compiled successfully" for a brief second then it'll compile again.

Activity icon

Replied to Error Compiling Sass That Has Svg

Yes, I thought that was the reason; sorry.

Activity icon

Replied to Error Compiling Sass That Has Svg

When the code is there and I run npm run watch, it compiles it and when it is completed, it repeats the compilation even if there's no changes made to the file.

Activity icon

Started a new Conversation Error Compiling Sass That Has Svg

Here's the code that causes problems

background: url('image/banner.svg') no-repeat 0 0;

After compiling, I looked at the compiled css and it turns to this:

background: url(image/banner.svg?6d61e52a8bbe69130e871671f2d704fc) no-repeat 0 0;

How can I fix this?

Nov
24
2 weeks ago
Activity icon

Replied to Document Expire When Back Is Pressed?

The "fdocument expired" error usually appears when the page you are going back to was generated by submitting a form.

Is that connected to session or cache?

Activity icon

Started a new Conversation Requests

Is it normal for the requests to be visible in the browser's network monitor?

If not, how can I make it hidden?

Nov
23
3 weeks ago
Activity icon

Started a new Conversation Is There A Way To Create A Record That Has One Or More Than A Level Deep?

I have 3 tables: User, Receipt, and Payment

User has many payment that has one receipt.

Is this possible?

$user->payment()->receipt()->create();
Nov
21
3 weeks ago
Activity icon

Replied to Are There Any Apis Similar To Speech-api?

@nakov Oh, sorry I forgot that speech api has 2 parts. One of them is the Speech Synthesis, like the one you suggested,which is the TTS and it is supported by most of the browsers. The other one is what I was asking, the Speech Recognition which grabs the voice input from the user, Siri and Alexa are some examples of this technology. As of now, the latter part isn't fully implemented yet by most of the browsers so I'm looking for alternatives.

Nov
20
3 weeks ago
Activity icon

Replied to Are There Any Apis Similar To Speech-api?

It's only for outputting TTS, it doesn't accept input from the user like SpeechRecognition does.

Activity icon

Started a new Conversation Are There Any Apis Similar To Speech-api?

As of this date, Chrome is the only browser, aside from some mobile browsers, that supports speech-api. Are there any alternatives that is available to most of the browsers?

Activity icon

Started a new Conversation Browser Detection Without Using UserAgent

Is there a way to detect the user's browser without using userAgent?

I've seen this one in stackoverflow

navigator.sayswho= (function(){
    var ua= navigator.userAgent, tem, 
    M= ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i) || [];
    if(/trident/i.test(M[1])){
        tem=  /\brv[ :]+(\d+)/g.exec(ua) || [];
        return 'IE '+(tem[1] || '');
    }
    if(M[1]=== 'Chrome'){
        tem= ua.match(/\b(OPR|Edge)\/(\d+)/);
        if(tem!= null) return tem.slice(1).join(' ').replace('OPR', 'Opera');
    }
    M= M[2]? [M[1], M[2]]: [navigator.appName, navigator.appVersion, '-?'];
    if((tem= ua.match(/version\/(\d+)/i))!= null) M.splice(1, 1, tem[1]);
    return M.join(' ');
})();

console.log(navigator.sayswho);

But it uses userAgent to detect.

Nov
17
3 weeks ago
Activity icon

Replied to Npm Packages Vulnerability

@bobbybouwmann Nothing. It doesn't do anything.

Activity icon

Started a new Conversation Npm Packages Vulnerability

Source: https://blog.npmjs.org/post/141702881055/package-install-scripts-vulnerability

The blog says it can be avoided by entering:

npm install --ignore-scripts

or

npm config set ignore-scripts true

However, if the code is used, I can't run npm run watch. What could be done to watch the compiled scripts?

Nov
15
4 weeks ago
Activity icon

Started a new Conversation How To Make Default Attribute Dynamic?

Is there a way to make the default attributes dynamic?

I want it to have a default value but when the privileged user overrides it, it will be the new default value.

Let's say I have this:

    protected $attributes = [
        'voucher' => 'freevoucher',
    ];

When the user decides to change the voucher, it will be the new default value until the seller changes it again.

Nov
09
1 month ago
Activity icon

Replied to How To Properly Divide An Amount?

does it have any differences when using Intl.NumberFormat?

Activity icon

Replied to How To Properly Divide An Amount?

@jlrdw how about in javascript?

does the x.toFixed(2) do the same?

Activity icon

Replied to IcheckJs With Vue

Oh, I'm sorry. Yes. Thanks for helping me!

Activity icon

Replied to IcheckJs With Vue

Since it uses an change event, I have to use that event in vue as well. So instead of @click, it should be @change.

Nov
08
1 month ago
Activity icon

Replied to IcheckJs With Vue

new Vue({
    el: "#app",
    methods: {
        lightsOn() {
            console.log("on");
        },
        lightsOff() {
            console.log("off");
        }
    },
    mounted() {
        $('input[type="radio"]').iCheck({
                radioClass: "iradio_square-green"
            }).on("ifChecked ifUnchecked", function(event) {
                $(this)[0].dispatchEvent(new Event("change"));
            });
    }
});

<div id="app">
    <div class="container mt-4">
        <input type="radio" name="tasks"> Lights On
        <input type="radio" name="tasks"> Lights Off
    </div>
</div>

Do I need to make the change listener?

The inputs don't have identifiers, I directly call the method when I wasn't using iCheck yet. If I don't have identifiers, how would the system know if the radio I click should be doing a certain task?

Activity icon

Replied to IcheckJs With Vue

$(this)[0].dispatchEvent(new Event("change"));

Ohh.. I haven't seen this one before. I'll read about it. Thanks!

Nov
07
1 month ago
Activity icon

Replied to IcheckJs With Vue

I'm sorry but can you give an example?

Activity icon

Replied to IcheckJs With Vue

Isn't custom events can only be done if there's a component and there's another file included?

Nov
06
1 month ago
Activity icon

Started a new Conversation How To Properly Divide An Amount?

I have 2 buttons as options

first button is for full amount, the second is for monthly for 3 months

For example. If the amount that needs to be paid isn't divisible by 3, like 2,543, should I just round the amount? If yes, in what nearest place?

Activity icon

Replied to IcheckJs With Vue

What if there are two or more radio buttons and each one of them does a method?

Nov
05
1 month ago
Activity icon

Replied to IcheckJs With Vue

So I have to give each radio/checkbox a unique id?

Activity icon

Replied to IcheckJs With Vue

When I click the very edge of the radio, it logs the message. It could be a rendering issue.

<div id="app">
    <div class="container mt-4">
        <input type="radio" @click="greet">
    </div>
</div>
new Vue({
    el: '#app',
    methods: {
        greet() {
            console.log('hello');
        }
    },
    mounted() {
        $('input[type="radio"]').iCheck({
            checkboxClass: 'icheckbox_square-green',
            radioClass: 'iradio_square-green',
         });
     }
});
Activity icon

Started a new Conversation IcheckJs With Vue

I tried implementing icheckJS with Vue

checkbox

<div class="container mt-4" id="app">
    <input type="radio" @click="greet">
</div>

script

    $('input[type="radio"]').iCheck({
      checkboxClass: 'icheckbox_square-green',
      radioClass: 'iradio_square-green',
            
    });

new Vue({
    el: '#app',
    methods: {
        greet() {
            console.log('hello');
        }
    }
});

When I click the checkbox, it doesn't trigger the click event.

Nov
03
1 month ago
Activity icon

Replied to Include Url Source Inside App.js

Maybe there are still other options. I want my master blade to not be cluttered with too many script sources and linked stylesheet.

Activity icon

Replied to Include Url Source Inside App.js

I just did that. It's still the same error.

Activity icon

Replied to Include Url Source Inside App.js

I did this:

 mix.scripts(['resources/js/paypal.js'], 'public/js/all.js')
 .js('resources/js/app.js', 'public/js')
 .sass('resources/sass/app.scss', 'public/css');

I'm getting an undefined error because app.js is being loaded first and to render paypal it needs the paypal.js

Edit: I did this:

mix
 .js('resources/js/app.js', 'public/js')
 .sass('resources/sass/app.scss', 'public/css')
 .scripts([
    'resources/js/paypal.js',
    'public/js/app.js',
    ], 'public/js/all.js');

Now I'm getting this error:

 Error: PayPal Payments SDK script not present on page! Excected to find <script src="https://www.paypal.com/sdk/js">
Activity icon

Replied to Include Url Source Inside App.js

Okay. I'll try it. Thanks!

Activity icon

Replied to Include Url Source Inside App.js

Is it okay to just enter this url and download it using "save as"?

https://www.paypal.com/sdk/js?client-id=t0R5jKrX2jd9TAyKhFNOfiAKYGuw9rnkh8Ywsc7bACH0eaDA5YWCjIHZ1vzFJDtolTBsEB6aT6wxbdpb&currency=USD&disable-card=visa,mastercard,amex
Activity icon

Replied to Include Url Source Inside App.js

Wait. If I downloaded the script, what would be the purpose of putting the url source?

Activity icon

Replied to Include Url Source Inside App.js

When I looked at public/js/all.js, it's empty. What does it do and is it intended to be empty?

Activity icon

Replied to Include Url Source Inside App.js

It didn't work even if it is hard-coded.