NightM4re

NightM4re

Member Since 3 Years Ago

Experience Points 7,210
Experience Level 2

2,790 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 69
Lessons
Completed
Best Reply Awards 0
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.

23 Nov
1 year ago

NightM4re started a new conversation Scope Problem In User Model

Hi everyone, I have problem making a scope in Laravel.

User.php

‚Äč```

23 Jul
2 years ago

NightM4re left a reply on Middleware & Commas - 5.2

If you see laravel documentation, your middleware name need to be the same that middleware that you call in your route or controller. Your middleware name is Checkroles, but you call the middleware like roles. In laravel documentation the middlewarename is RoleMiddleware, I recommend to you to try to puch checkroles in your route or middleware or change your middlewarename to roles Tell me if you can solve this

05 Jul
2 years ago

NightM4re left a reply on Problem With V-show

Solved, I am comparing string and not numbers!, only I need to do this

Stock: function(cantidad, existe){
            if(Number(cantidad) > Number(existe)){
                return true
            }
            return false
        }

NightM4re started a new conversation Problem With V-show

I want to show a message warning when the quantity that one people want to buy of some product is more bigger than my quantity available of that product. I am doing this with this line of code

<p v-show="Stock(product.cantidad, product.product.cantidad)" style="color:#ff6a00">No hay suficiente Stock</p>

and my function Stock is

Stock: function(cantidad, existe){
            if(cantidad > existe){
                return true
            }
            return false
        }

The problem is when existe variable is 5 and cantidad variable 6, return true and always is ok, but if cantidad variable is 10 return true again, this mean 6 > 5 is true (correct) 6 > 8 is false (correct) 6 > 10 is true (incorrect) and go on until 6> 59 is true (incorrect) 6> 61 is false (correct)

Is like 6 is greater than 10 because then represent only 1 and not then. Please help because I don't know how to solve this

05 Jun
3 years ago

NightM4re left a reply on Problem With Scope

Solved

'''javascript public function scopeApellidos($query, $apellidos) { if ($apellidos != "") { return $query->where(\DB::raw("CONCAT(nombres, ' ', apellidos)"), 'LIKE', "%$apellidos%"); } return $query; } '''

NightM4re started a new conversation Problem With Scope

Hi everyone, I am trying to use scope for find a user with a search form. In this search I want to put first_name (nombres) and last_name (apellidos) and the scoope can find what user I want. Here is my scoope and my controller Scope public function scopeApellidos($query, $apellidos) { if ($apellidos != "") { return $query->where(\DB::raw("CONCAT(nombres, ' ', apellidos)"), $apellidos); } return $query; } Controller $users = User::orderBy('apellidos')->email($request->email)->apellidos($request->apellidos)->type($request->type)->get();

The problem is that debugbar say select * from users where CONCAT(nombres, ' ', apellidos) = 'cabrera' order by apellidos asc

but I dont recieve any user in my usertable but I have one that have last_name (apellidos) cabrera Thanks for help me

27 May
3 years ago

NightM4re left a reply on Vue Resource Problem With Get

Solved!!!! . Only I need to put the CDN in header with vue.js and not before body tag. Thanks all

NightM4re left a reply on Vue Resource Problem With Get

How I can to solve that? that charge first the vue-resource and after main.js?

NightM4re left a reply on Vue Resource Problem With Get

I am including vue resource with Cdn but continue doesn't work. And chrome said that I am including correctly. So I am not understand what happened

NightM4re started a new conversation Vue Resource Problem With Get

Hi everyone, this is my first post here in Laracast and I am so exiting learning laravel with vue.js. I am trying to make ajax request with vue resource but I have some problem. I hope you can help me to solve this because I really want to use this plugin. Here is my error " main.js:14 Uncaught TypeError: Cannot read property 'get' of undefined "

And my code is in main.je

Vue.config.debug = true; Vue.config.devtools = true;

var urlAPI = 'http://api.randomuser.me/?results=5'; new Vue({ el: '#app',

created: function() { this.consultarAPI(); },

methods: { consultarAPI: function(){ this.$http.get(urlAPI).then(function (response){ console.log('Bien'); }, function(response) { console.log('Mal'); }); } } });

and my code in index.html

<div class="container" style="margin-top:100px;">
    <div id="app">
          <div class="row">
            <div class="col s12 m2 l3"><p></p></div>
            <div class="col s12 m8 l6">
                <p>
                    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Fugiat eius consectetur aspernatur doloribus libero modi, facere culpa! Tenetur soluta omnis perferendis ipsa esse, voluptates excepturi repellendus aperiam corporis vel vitae?
                </p>
            </div>
            <div class="col s12 m2 l3"></div>
          </div>
    </div>
</div>

And when I try to use the normal call

methods: { consultarAPI: function(){ this.$http({url: urlAPI, method: 'GET'}).then(function (response){ console.log('Bien'); }, function(response) { console.log('Mal'); }); } }

I receive this message

"main.js:14 Uncaught TypeError: this.$http is not a function"

Thanks so much for help me.