sdve

sdve

Member Since 5 Months Ago

Experience Points
220
Total
Experience

4,780 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
0
Lessons
Completed
Best Reply Awards
0
Best Reply
Awards
  • start your 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-in-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 Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • evangelist 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
220 XP
Jun
22
4 months ago
Activity icon

Replied to Error Update Model With Unique Field

class UserUpdateRequest extends FormRequest

{ public function authorize() { return true; }

public function rules()
{
    return [
        'name' => 'required|max:55',
        'email' => 'required|email|unique:users,email,'.$this->user->id,
        'sexo' => 'required|in:P,H,M',
        'nacimiento' => 'required|date',
    ];
}

}

Activity icon

Started a new Conversation Error Update Model With Unique Field

Previously, validation worked for me, but now I don't know what happened when I try to update the unique field, it reports the following error.

"message": "Trying to get property of non-object",
"exception": "ErrorException",
"file": "/Applications/XAMPP/xamppfiles/htdocs/crimen/app/Http/Requests/UserUpdateRequest.php",
"line": 28,
"trace": [
    {
        "file": "/Applications/XAMPP/xamppfiles/htdocs/crimen/app/Http/Requests/UserUpdateRequest.php",
        "line": 28,
        "function": "handleError",
        "class": "Illuminate\Foundation\Bootstrap\HandleExceptions",
        "type": "->"
    },
{
	.....
}

My Validation:

public function rules()
{
    return [
        'name' => 'required|max:55',
        'email' => 'required|email|unique:users,email,'.$this->user,
        'sexo' => 'required|in:P,H,M',
        'nacimiento' => 'required|date',
    ];
}
Jun
10
4 months ago
Activity icon

Started a new Conversation Refresh Component Infinite-loading

Hi, I am using the infinite-loading component, how could I load the component after inserting data from a modal.

        <b-col sm="12">
            <b-card bg-variant="dark" text-variant="white" class="mt-3 mb-3" title="Info" 
            v-for="(item,index) in list" :key="index">
              <b-card-text>
                    <h5 v-text="item.nombre_region"></h5>
                    <h5 v-text="item.created_at"></h5>
              </b-card-text>
                    <b-button
                        size="sm"
                        v-b-modal.modal-edit
                        @click="editRegion(item.id)"
                        variant="primary"
                    >
                        Editar
                    </b-button>

                    <b-button
                        size="sm"
                        v-b-modal.modal-delete
                        @click="deleteRegion(item.id)"
                        variant="danger"
                    >
                        Eliminar
                    </b-button>
            </b-card>

            <infinite-loading @distance="1" @infinite="infiniteHandler" ref="infiniteLoading">
                <div slot="no-more">Fin</div>
                <div slot="spinner">Cargando...</div>
                <div slot="no-results">Sin resultados</div>
            </infinite-loading>

        </b-col>

methods:{
        infiniteHandler($state) {
            this.page++
            let url = 'api/region?page='+this.page
            this.$http.get(url)
            .then(response => {
                let posts = response.data.data
                if(posts.length){
                    this.list = this.list.concat(posts)
                    $state.loaded()
                }else{
                    $state.complete()
                }
            })
        }
}
May
05
5 months ago
Activity icon

Replied to Restart Validation Request Form In Vue

in my form: @submit.prevent="saveNota()" @keydown="errors.clear($event.target.name)"

May
04
5 months ago
Activity icon

Started a new Conversation Restart Validation Request Form In Vue

I have a form to insert data and it shows the validation errors using vuejs, modal bootstrap I have my form which validates the entered information. Problem: If for some reason the form shows me the validation, if I close the modal and reopen, the validation messages keep showing.

class Errors {
    constructor(){
        this.errors = {};
    }
    has(field){
        return this.errors.hasOwnProperty(field);
    }
    any(){
        return Object.keys(this.errors).length > 0;
    }
    get(field){
        if (this.errors[field]) {
            return this.errors[field][0];
        }
    }
    record(errors){
        this.errors = errors;
    }
    clear(field){
        delete this.errors[field];
    }
}
Curso
<div class="form-group">
    <label for="exampleInputEmail1">User</label>
    <input type="number" name="user_id" class="form-control" v-model="user_id">
    <span class="text-danger" v-if="errors.has('user_id')" v-text="errors.get('user_id')"></span>
</div>

<div class="form-group">
    <label for="exampleInputEmail1">Nota</label>
    <input type="number" name="nro_nota" class="form-control" v-model="nro_nota">
    <span class="text-danger" v-if="errors.has('nro_nota')" v-text="errors.get('nro_nota')"></span>
</div>

<button type="submit" class="btn btn-primary" :disabled="errors.any()">Registrar</button>

This cleans up the inputs but the validation errors are shown

clearForm(){ this.curso_id = ''; this.user_id = ''; this.nro_nota = ''; this.errors.clear(); },

May
03
5 months ago
Activity icon

Started a new Conversation Server Table With Related Table

Greetings friends, I am using vue js in laravel. Install the component Vue Tables 2.

I followed the documentation and if I can show the data, but only if it is 1 table, when I try a related table it shows me an error.

Returns the data in json type

public function notasJson()
{
$table = new EloquentVueTables;
$data = $table->get(new Nota, ['id' ,'nro_nota','created_at']);
return response()->json($data);
}

use App\TableVue\EloquentVueTables; https://raw.githubusercontent.com/matfish2/vue-tables-2/master/server/PHP/EloquentVueTables.php

I could use something like this: Nota::with('user','curso')->get(); ??