heykatieben

heykatieben

Member Since 1 Year Ago

Experience Points 1,280
Experience Level 1

3,720 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 3
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.

02 Apr
4 months ago

heykatieben left a reply on Many To Many Relationship, Same Table?

Got it!

      BelongsToMany::make('Sometimes Contains', 'sometimes_contains', 'App\Nova\Ingredient')->fields(function () {
        return [
          Select::make('Relationship')->options([
            'Always Contains' => 'Always Contains',
            'Sometimes Contains' => 'Sometimes Contains',
          ])
        ];
      }),
      BelongsToMany::make('Always Contains', 'always_contains', 'App\Nova\Ingredient')->fields(function () {
        return [
          Select::make('Relationship')->options([
            'Always Contains' => 'Always Contains',
            'Sometimes Contains' => 'Sometimes Contains', 
          ])
        ];
      })

Case closed - hope this example helps someone :)

heykatieben left a reply on Many To Many Relationship, Same Table?

Zomg, actually, I'm close! This almost works (was missing 2nd argument):

  public function always_contains() {
    return $this->belongsToMany('App\Ingredient', 'ingredient_ingredient', 'source_ingredient_id', 'dest_ingredient_id')->where("relationship", "Always Contains");
  } 

  public function sometimes_contains() {
    return $this->belongsToMany('App\Ingredient', 'ingredient_ingredient', 'source_ingredient_id', 'dest_ingredient_id')->where("relationship", "Sometimes Contains");
  } 

The only missing piece here is hooking into save to get the relationship type correct (always contains / sometimes contains). Will update if/when I figure that part out.

heykatieben started a new conversation Many To Many Relationship, Same Table?

I'm trying to model ingredients, that contain many other ingredients - either "may contain", or "always contains" (many to many with a relationship type defined). I'm having trouble figuring out how to model this, especially in Nova.

Right now my table is ingredient_ingredient, with columns source_ingredient_id, dest_ingredient_id, and relationship (enum "always contains", "may contain"). I have this in my base model:

  public function always_contains() {
    return $this->belongsToMany('App\Ingredient', 'source_ingredient_id', 'dest_ingredient_id')->where("relationship", "Always Contains");
  } 

  public function sometimes_contains() {
    return $this->belongsToMany('App\Ingredient', 'source_ingredient_id', 'dest_ingredient_id')->where("relationship", "Sometimes Contains");
  } 

In the Nova model, I have this:

      BelongsToMany::make('Sometimes Contains', 'sometimes_contains', 'App\Nova\Ingredient'),
      BelongsToMany::make('Always Contains', 'always_contains', 'App\Nova\Ingredient') 

Any pointers?

12 Jan
7 months ago

heykatieben started a new conversation Limit # Team Members Before Team Signs Up For Plan?

Hi - I'm trying to figure out how to have a free trial (no cc up front = no plan), and also restrict the number of team members allowed. Has anyone done this?

19 Oct
10 months ago

heykatieben started a new conversation (deleted)

(deleted)

12 Oct
10 months ago

heykatieben left a reply on Logout (site Data Getting Cleared) Right After Login, If User Not A Developer?

Thanks, Talinon. I found it, in my case it was simple and something I'd done: the pages were using vue components, and those vue components were connecting with controllers that were set to 'dev' auth. Oops! I did also, in the process, change several things about the session data, though I'm pretty sure the actual problem was that simple.

heykatieben started a new conversation Logout (site Data Getting Cleared) Right After Login, If User Not A Developer?

Hi hi - in Spark, if a user is not a developer (listed in the Spark Service Provider), they are getting logged out as soon as they log in. Any idea why or how I can debug? Thanks.

heykatieben left a reply on Adding Registration Fields For Teams

Update: I finally got this by doing the above, and also directly updating spark/src/interactions/Auth as follows, below. I tried swapping the function but it didn't work for some reason. I'll update this if I ever figure that out.

public function configureTeamForNewUser(RegisterRequest $request, $user)
    {
        if ($invitation = $request->invitation()) {
            Spark::interact(AddTeamMember::class, [$invitation->team, $user, $invitation->role]);

            self::$team = $invitation->team;

            $invitation->delete();
        } elseif (Spark::onlyTeamPlans()) {
            self::$team = Spark::interact(CreateTeam::class, [
        $user, ['name' => $request->team,
        'slug' => $request->team_slug,
        //my extra data here
            ]);
        } 

        $user->currentTeam();
    }

heykatieben left a reply on Adding Registration Fields For Teams

Hi there, thanks for this hint, I'm trying to do this now.

I'm still stuck on this. Is this everything you did? Did you update this for the latest Spark?

18 Sep
11 months ago

heykatieben left a reply on Axios.get Blocks Page Load? (newbie Question)

Here's my code if it helps:

created() {
    var self = this;
    this.checkWorklog();     
}, 

methods: { 

async checkWorklog() {
        axios.get('/api/has_worklog')
            .then(response => {
        if(response.data) { 
        this.getWorklog();
        }
        else {
        this.getScheduled();
        }
            });
    },  

async getWorklog() {
        axios.get('/api/current_worklog')
            .then(response => { 
                this.worklog = response.data;
        this.hasWorklog = true;
        this.startTimer();
            });
    }

    }

heykatieben started a new conversation Axios.get Blocks Page Load? (newbie Question)

Hi - this is one of those questions where I don't know exactly what I don't know / what to Google. I'm doing an axios.get call, and you can't interact with the page (what php rendered) until the axios.get call returns / does its thing. I'm wanting to be able to interact with the page before javascript finishes, as the javascript is doing something in the header that I don't necessary need before taking an action on the rest of the page.

I think I'm looking for some kind of asynchronous something, but - what? What am I missing?

Thanks!

13 Sep
11 months ago

heykatieben started a new conversation Use Nova With Spark?

Has anyone used Nova with Spark? I'm not clear on exactly how/if they'd work together since they both have admin panels. Thoughts?

04 Sep
11 months ago

heykatieben started a new conversation Vue Component Causing Auto Logout? Session Variable Issue Maybe?

My vue component is causing an auto logout, only when the user is not an admin specified in the SparkServiceProvider. So what is different about those users?

The CRUD operations my vue component uses have the web middleware, and have been given the user prop. Everything works as expected when logged in as a Spark admin, and when logged in as a non-admin, the session expires as soon as I hit the page with the Vue component.

I tried this, this didn't work: https://github.com/rairlie/laravel-locking-session. Any other ideas?

Thanks!

29 Aug
11 months ago

heykatieben left a reply on "Create A Team" Page Blank?

Solved: it was caused by Spark::noAdditionalTeams();. I had expected this to limit users to one team, instead it apparently meant that nobody could make any new teams at all.

heykatieben started a new conversation "Create A Team" Page Blank?

Hi all - I just installed a fresh new version of Laravel Spark, and the 'Create a Team' page shows up blank, with no errors. I've tried installing with/without team billing. Any ideas? I'll update as I get clues as well. Thanks!

13 Aug
1 year ago

heykatieben started a new conversation Deep Linking To Admin Sections?

Does anyone know how to deep link to sections - say, the upgrade section? /settings#/payment-method

28 Jun
1 year ago

heykatieben left a reply on CarbonInterval Cascade For Humans Not Working?

Ah, gotcha. I'll take my chances for now & report back when I notice something gone wrong.

heykatieben left a reply on CarbonInterval Cascade For Humans Not Working?

It's a breaking change? I don't quite understand.

heykatieben left a reply on CarbonInterval Cascade For Humans Not Working?

^^ I think it needs to be added to Laravel that way due to some kind of incompatibility - I think I ran across that somewhere in my googling, not fully sure. Anyway this hasn't caused problems for me yet, will report back if it does!

heykatieben left a reply on CarbonInterval Cascade For Humans Not Working?

!!! YAY! Got it! :) Thanks @burlresearch for the step closer!

So once I knew for sure it wasn't included, I added this to composer:

"nesbot/carbon": "1.29.0 as 1.25.0"

(src: https://github.com/laravel/framework/issues/24335)

Then this works in my Blade template:

\Carbon\CarbonInterval::seconds($seconds)->cascade()->forHumans()

Yay! :)

heykatieben left a reply on CarbonInterval Cascade For Humans Not Working?

Yeah, that's what I ended up with although it's not really what I wanted - I was hoping for the cleaner formatting of forHumans. I could write it though hoping someone knows why this doesn't work first...

heykatieben left a reply on CarbonInterval Cascade For Humans Not Working?

Thanks, that's not what I'm wanting though. That displays time of day in a certain way - I'm trying to display a time interval. Like 4864 seconds = x hours, y minutes, z seconds.

heykatieben left a reply on CarbonInterval Cascade For Humans Not Working?

... I suspect cascade isn't implemented in Laravel's Carbon, I'm not finding it when I grep. Not sure why it's not returning an error.

heykatieben started a new conversation CarbonInterval Cascade For Humans Not Working?

I'm trying to do this:

CarbonInterval::seconds($seconds)->cascade()->forHumans();

This isn't working for whatever reason - it just displays $seconds, unformatted (i.e., 4948 seconds). Any ideas?

31 Mar
1 year ago

heykatieben left a reply on Adding CMS Features To Laravel Spark (Voyager, Backpack?)

Has anyone done this recently? I tried and the composer install runs into issues - I'm not sure what I'm looking at to understand it.

28 Mar
1 year ago

heykatieben started a new conversation How Can We Legally Share (git, Sell, Etc) Anything Built On Laravel Spark?

Hi team - is anyone clear on how this would have to work? Since Laravel Spark is copyrighted, how could I either sell or share (git, etc) any code built on it? My code isn't clearly separated from Spark the way, say, a WordPress plugin would be separated from WordPress, since there's the /vendor directory in /views that I'm updating, etc. Thoughts?

21 Mar
1 year ago

heykatieben left a reply on Using Migrations Without Versioning?

Oops, I meant that I have one migration file per model. Wouldn't migrate:refresh blow away my current data?

heykatieben started a new conversation Using Migrations Without Versioning?

This might be a silly question (full disclosure: I'm a Laranewbie :).

Anyway: I'd like to use migrations without versioning. I love the versioning for a live project, though when first developing a project it seems nicer to me to be able to see/edit everything on a database in one file. Is there a way to do this that I'm missing, to be able to edit migrations / apply them without blowing away data?

My current solution is to export data, refresh migrations, import data. Is there a better way?

18 Mar
1 year ago

heykatieben left a reply on Switch To Zurb/Foundation?

... My current solution is to use Bootstrap 4 on administrativey looking views, and Zurb on the rest. Probably not a good solution for most though I think will work best for me since the service people are paying for is more like a game. :)

27 Feb
1 year ago

heykatieben left a reply on Switch To Zurb/Foundation?

The switch to Zurb was really easy on virgin Laravel. But I ended up deciding I wanted the app structure of Spark, so went back to that, and now I'm back to Bootstrap, missing Zurb again. Goodness, I'm so torn. Would love to keep this thread open & hear if others have tried Zurb on Spark.

22 Feb
1 year ago

heykatieben left a reply on Switch To Zurb/Foundation?

Just did this for plain Laravel + auth & it worked well! I'm just letting go of Spark. Thanks for the tip! That's much cleaner than what I found / tried first.

21 Feb
1 year ago

heykatieben left a reply on Switch To Zurb/Foundation?

Cool, okay. Even for Spark, you think?

heykatieben started a new conversation Switch To Zurb/Foundation?

Has anyone successfully switched to Zurb/Foundation on Laravel Spark? Any tips, or is this ridiculous / just way too much Bootstrap markup going on in Spark?

16 Dec
1 year ago

heykatieben left a reply on Dynamically Display Updated User Stats?

zomg I figured it out!!!

Bus.$emit('updateUser');

heykatieben started a new conversation Dynamically Display Updated User Stats?

Hi all - I think this is probably simple though I don't know what I'm doing. :)

I added some custom user stats to <spark-navbar>, that display using vue, like this:

@{{ user.money }})

How do I get that display to update when the user object is updated? Things happen in new custom vue components outside this one, and I want to update the user object here so these values will update. How do I do that?

I've tried adding user to mounted() in spark-navbar like this:

Vue.component('spark-navbar', {
    mixins: [base],

    mounted() {
        console.log(Spark.state.user);
    }
});

Thanks!

27 Nov
1 year ago

heykatieben left a reply on Updates To The Mobile App Framework Discussion

How's Phonegap/Cordova these days? I used it years ago and thought it was neat though noticeably slower.

heykatieben started a new conversation Updates To The Mobile App Framework Discussion

Hi all - I'm working out what I'm going to use for mobile app development. Something Vue-based like Weex? React Native and try to get Laravel (Spark) using React? Just develop in both React and Vue with Laravel as-is + React Native?

So here's another discussion of mobile for November 2017 - what are you all using now? New thoughts/ideas?

26 Oct
1 year ago

heykatieben started a new conversation "No Such File Or Directory" When Running Spark?

When I try to run spark, even though it's in my path variable and seems to be running (whereis spark returns the location), I get this error:

: No such file or directory

Any ideas?