kaylakaze

kaylakaze

Member Since 4 Years Ago

Experience Points
4,775
Total
Experience

225 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
108
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 1
4,775 XP
03 Mar
2 years ago

kaylakaze left a reply on Using Webpack With Externals

If anyone else wants to know this, I've figured it out. Add the following to your webpack.mix.js file before the .js function

.webpackConfig({
        externals:{
            'lodash':'_',
            'jquery':'jQuery',
            'vue':'Vue'
        }
    })

and then make sure you load Lodash, Vue, and jQuery using script tags in your pages. My app.js is 64kB instead of 1.1MB doing it this way.

02 Mar
2 years ago

kaylakaze started a new conversation Using Webpack With Externals

How would you go about setting up Vue, Lodash, Bootstrap, and jQuery as externals using the 5.4 webpack system?

I don't need a 1MB .js file that needs to be recompiled and redownloaded every time I update my code which would otherwise be under 100k. Those jQuery, Bootstrap and other libraries are going to be cached by ISPs and, even when not, able to be pulled from much faster CDNs than trying to pull them from my system (plus they can be cached on the user side as well). From my understanding, instead of compiling the code of jQuery, etc into your app.js file, webpack could use externals to compile your stuff in the expectation that, even if $, _, and Vue aren't around now, they will be at runtime. I used to use browserify-shim for this with Elixir.

So how would I go about getting "npm run dev" or "npm run production", etc to use those common libraries as externals?

13 Jun
3 years ago

kaylakaze left a reply on [Tip] Single App - Multi Dbs And Domains

This was a really good tip This has worked great for me, with fairly limited modification to my current code. Thanks.

13 Jan
3 years ago

kaylakaze left a reply on .env Not Reading Variables Sometimes

Have you tried "php artisan config:cache" after changes to the .env file as suggested in that other post?

16 Nov
3 years ago

kaylakaze left a reply on Laravel Socialite - Problem

None of these "solutions" worked for me. Google log in was working for me, then I logged out and tried to log back in and it wouldn't work.

13 Nov
3 years ago

kaylakaze left a reply on Dynamic Gate Abilities

I used your code as a starting point and I think I found a solution (or at least one that works for my needs that seem to fit this question).

    public function boot(GateContract $gate)
    {
        parent::registerPolicies($gate);

        $gate->before(function($user, $ability) use ($gate){
            return $user->hasPermission($ability);
        });
   }

I haven't extensively tested this, but it seems to work from my quick tests. No actual definitions need to be created because all the checking is handled by the before. User::hasPermission is a custom method to test $ability.

09 Jun
4 years ago

kaylakaze left a reply on PDF's And Laravel

mPDF is still by far the best solution that I've found. It only took 5 minutes of looking at dompdf to see it wasn't even a contender. Just a couple of features of mPDF that destroy dompdf right from the start: automated TOC generation with hotlinks and bookmark generation, a pagebreak tag for forcing a pagebreak in markup (with the option to reconfigure all the aspects of the new page), and automatic page numbering. If you just need to spit out a copy of a web page, I guess dompdf works fine, but if you actually need to generate a document, mPDF is the way to go, especially if you need exact precision. It has a bit of a learning curve, but it's not that steep. The only issue real issue I've had with it is being unable to float within a float. I've used it to make lots of things from legal documents to maps to status reports.

I haven't used it with Laravel yet (I'm about to, which is how I ended up here) but I don't anticipate it being a problem at all.

22 Apr
4 years ago

kaylakaze started a new conversation .env Not Reading Variables Sometimes

I've set up a custom variable in my .env file, DISPLAY_TZ, to designate the timezone that the app should display times in. I have the User $tz variable being set to this using getenv('DISPLAY_TZ')?:date_default_timezone_get() and then used by calling setTimezone(Auth::user()->tz) on my Carbon object in the view. Seemingly at random, the times displayed will be in UTC (the date_default value) and not America/New_York (the .env value). I don't think this is a Carbon issue, because when I change it to getenv('DISPLAY_TZ')?:'America/New_York' it's always correct. My app loads many pieces of the page via AJAX, if that could be the issue? Also, seemingly at random, some of my AJAX calls will return my access denied page (I'm using Laraguard) even when I have access to the page and a refresh fixes it. I'm wondering if it's related. I'm using SQLite for my database so I'm not using any database variables from the .env so I wouldn't know if those are also not loading.