potentdevelopment

potentdevelopment

Member Since 7 Months Ago

Los Angeles

Experience Points 550
Experience Level 1

4,450 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 2
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.

15 Jul
15 hours ago

potentdevelopment left a reply on Eager Loading Multiple Relationships Error Thrown

Thanks for this. This worked exactly how I wanted. I did have to change id to home_models.id etc because it was returning as ambiguous.

So 'groupItems' also has a

public function options() {
        return $this->hasMany('App\Option');
    }

Is there a way I can get all those joined data as well in this one call?

potentdevelopment started a new conversation Eager Loading Multiple Relationships Error Thrown

Hello,

I am trying to eager load multiple relationships and run a where clause on it here is my code:

$menu_group = MenuGroup::with([
      'groupItems',
      'homeModels' => function(Builder $query) use ($model_id) {
        $query->where('id', $model_id);
      },
      'communities' => function(Builder $query) use ($community_id) {
        $query->where('id', $community_id);
      }])->get();

Relationship setup in my Model:

public function groupItems() {
        return $this->belongsToMany('App\GroupItem');
    }

    public function homeModels() {
      return $this->belongsToMany('App\HomeModel', 'menu_group_model');
    }

    public function communities() {
      return $this->belongsToMany('App\Community', 'menu_group_model');
    }

The following is the error I'm getting:

Argument 1 passed to App\Http\Controllers\OptionsController::App\Http\Controllers\{closure}() must be an instance of Illuminate\Database\Eloquent\Builder, instance of Illuminate\Database\Eloquent\Relations\BelongsToMany given, called in /var/www/signature.digitalempireweb.com/signature-homes/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php on line 562

So I'm trying to return menu group with a specific model_id and specific community_id

12 Jul
3 days ago

potentdevelopment started a new conversation Pivot Table Column Name Override Issue With Voyager

Hello,

In my model, I have blongsToMany setup as this:

return $this->belongsToMany('App\Community', 'community_model', 'community_id', 'model_id');

I've setup a belongs to many relationship in Voyager and when I try to add data, I get an error saying that models_id is not found in the database. It seems Voyager is still trying to go by default naming convention instead of using the override. Any solutions to this?

11 Jul
4 days ago

potentdevelopment left a reply on Getting ALL Joined Data

Thanks for this info. Now if I wanted to search by id on organization and business how can I do this?

potentdevelopment started a new conversation Getting ALL Joined Data

Hello,

So if I have a database design which includes multiple relationships, how can I get ALL. At the very top, I have the organization table which is joined to a Business Unit table and so on. I'd like to query the Organization table by id and then get ALL info including the joined data further down the line. I hope this makes sense. I would add a ER diagram but I can't seem to add images here.

29 May
1 month ago

potentdevelopment left a reply on Return Value From DB::insert()

@BOBBYBOUWMANN - When I run the above code, I get this message: "Call to undefined method Illuminate\Database\PostgresConnection::insertGetId()"

potentdevelopment left a reply on Return Value From DB::insert()

@BOBBYBOUWMANN - Thanks for this. So would this just be:

$results = DB::insertGetId("
          SELECT * FROM insrdata.add_insured_parent(
              :assocID,
              :accountID,
              :insuredContactID,
              :parentFirstName,
              :parentLastName,
              :address1,
              :address2,
              :city,
              :state,
              :zipCode,
              :phone,
              :email
          )
        ",
        ['assocID' => $request->input('assocID'), 'accountID' => $request->input('accountID'), 'insuredContactID' => $request->input('insuredContactID'),
        'parentFirstName' => $request->input('parentFirstName'), 'parentLastName' => $request->input('parentLastName'), 'address1' => $request->input('address1'),
        'address2' => $request->input('address2'), 'city' => $request->input('city'), 'state' => $request->input('state'),
        'zipCode' => $request->input('zipCode'), 'phone' => $request->input('phone'), 'email' => $request->input('email')]);

potentdevelopment started a new conversation Database Structure For Menu/options System

Hello,

I have a question regarding what would be the best procedure for creating a database to create and store menu's along with options. I'm thinking something similar to WP's menu system but I also need to store options values on if a certain menu option should show up or be allowed to be clicked.

potentdevelopment started a new conversation Return Value From DB::insert()

I'm running the following DB::insert statement:

$results = DB::insert("
          SELECT * FROM insrdata.add_insured_parent(
              :assocID,
              :accountID,
              :insuredContactID,
              :parentFirstName,
              :parentLastName,
              :address1,
              :address2,
              :city,
              :state,
              :zipCode,
              :phone,
              :email
          )
        ",
        ['assocID' => $request->input('assocID'), 'accountID' => $request->input('accountID'), 'insuredContactID' => $request->input('insuredContactID'),
        'parentFirstName' => $request->input('parentFirstName'), 'parentLastName' => $request->input('parentLastName'), 'address1' => $request->input('address1'),
        'address2' => $request->input('address2'), 'city' => $request->input('city'), 'state' => $request->input('state'),
        'zipCode' => $request->input('zipCode'), 'phone' => $request->input('phone'), 'email' => $request->input('email')]);

The $result returns bool true or false. Is the return for DB::insert() just returning whatever is being returned by the stored procedure or is bool just what Laravel returns? Also, how can I run the statement above and get the value of the last inserted id?

04 May
2 months ago

potentdevelopment started a new conversation Homestead-7: Unable To Mount One Of Your Folders. Please Check Your Folders In Homestead.yaml

When I launch homestead, I get the error: homestead-7: Unable to mount one of your folders. Please check your folders in Homestead.yaml

I'm noticing also, that my local folder and the vm's folder are not syncing. I've found others with the same issue on here but none of the solutions seem to be working for me.