dextercampos

dextercampos

Member Since 2 Years Ago

Experience Points 12,940
Experience Level 3

2,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 117
Lessons
Completed
Best Reply Awards 2
Best Reply
Awards
  • Start Your Engines Achievement

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • First Thousand Achievement

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • One Year Member Achievement

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • Two Year Member Achievement

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • Three Year Member Achievement

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • Four Year Member Achievement

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • Five Year Member Achievement

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • School In Session Achievement

    School In Session

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

  • Welcome To The Community Achievement

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • Full Time Learner Achievement

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • Pay It Forward Achievement

    Pay It Forward

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

  • Subscriber Achievement

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • Lifer Achievement

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • Laracasts Evangelist Achievement

    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 Achievement

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • Laracasts Veteran Achievement

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • Ten Thousand Strong Achievement

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • Laracasts Master Achievement

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • Laracasts Tutor Achievement

    Laracasts Tutor

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

  • Laracasts Sensei Achievement

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • Top 50 Achievement

    Top 50

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

24 Sep
6 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
7 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
7 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;