dextercampos

dextercampos

Member Since 2 Years Ago

Experience Points 13,940
Experience Level 3

1,060 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 127
Lessons
Completed
Best Reply Awards 2
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.

24 Sep
9 months ago

dextercampos left a reply on Vue Default Selection For Select

You don't need to bind form.company_id into the select. Also, as far as I know you can't do multiple bindings for v-model just like what you did.

All you need to do is v-model=selected and set the default value in you data - just like what you did. You now can remove company_id in you new Form({...}).

Final result would be similar to this:

<template>
// form fields
    // bind selected to this form input
    <select v-model="selectedCompanyId" 
                  name="company_id">
        <option v-for="company in companies"
                        :value="company.id"
                        v-text="company.name"></option>
    </select>
// more fields
</template>

<script>
    export default {
        props: ['companies'],
        data() {
            return {
                form: new Form({
                    name: '',
                    display_name: '',
                    phone: '',
                }),
                selectedCompanyId: '1' // initial value. This will automatically change when a diff value is selected in the input.
            }
        },
// methods etc
}
</script>

dextercampos left a reply on How To Access All Values From Calculated Field And Pass Them In Array?

If calling ->first() works that means $excelente is a collection of rows. You must use a loop to retrieve all values from that calculated field.

// Is excelentes the plural of excelente? lol
$excelentes = ...->get();


foreach($excelentes as $excelente) {
    // $excelente->cantidad
}

Check out the documentation for reference: https://laravel.com/docs/5.7/queries#retrieving-results

20 Sep
9 months ago

dextercampos left a reply on Database Seeding Primary Key Integrity Constraint Violation

Try this on your bids seeder:

public function run()
{
    $bids = factory(App\Bid::class, 50)->create()->each(function ($bid){
        $actions = factory(App\Action::class, 8)->create(['bid_id'=>$bid->id]);
    });
}

dextercampos left a reply on Help Me Validate My Form Pls

You're missing the call to validate. Validator::make() just creates the validator but does not actually validate it yet.

$validator = Validator::make(...);

if ($validator->fails()) {
    // redirect back or throw exception or whatever
    return redirect()->back()
        ->withErrors($validator)
        ->withInput();
}

// Save

dextercampos left a reply on Dompdf Mail With Attachment

@zaster can you show me the whole error stack trace?

19 Sep
10 months ago

dextercampos left a reply on Creating Default Object From Empty Value: Laravel 5.6

You should still check if $user = User::find($request->id); results to null. Otherwise, you'll find yourself in the same situation when you create another form that uses the same route. Maybe:

$user = User::findOrFail($request->id);

Or:

$user = User::find($request->id);
if(!$user) {
    // Code to handle user not found. Either throw an exception or display a 404 page
}

dextercampos left a reply on Dompdf Mail With Attachment

Your mistake is using $quotation inside an anonymous function. To fix this you should update:

Mail::send(['text'=>'mail'], $info, function($message){

To:

Mail::send(['text'=>'mail'], $info, function($message) use ($quotation){

and you should be good :)

dextercampos left a reply on After Host Images Are Not Uploaded To Public/storage But Upload To Storage/ App/public

Make sure public/storage and storage/app/public are linked. Did you run

php artisan storage:link

dextercampos left a reply on Acessor On The Model To Get A Full_name

You are returning a boolean value. What you should do is to just return the $name.

return $name;