Full-Stack Web Developer at Self-Employed

Member Since 3 Years Ago

Columbia, SC

Experience Points

530 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
Best Reply Awards
Best Reply
  • 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.


    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.


    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.

Level 2
9,470 XP
3 weeks ago
Activity icon

Replied to Trying To Get Property Of Non -object Laravel Backpacl

Hi @andreacris! It's a little bit hard to say with absolute certainty whether the problem is in your code or on the shared hosting, but with an error like "Trying to get property of non-object," my first idea would be that it is an error somewhere in the code.

The most common reasons that I see that error in my own applications are:

  1. You've encountered an edge-case that you didn't anticipate while you were writing the code (don't worry, it happens to everyone!)

  2. Somewhere, somehow, the data in your application has become "dirty". By that, I mean that the data you're expecting to exist in your system has been changed or removed to not meet the assumptions of the other bits of data in your system. For example, maybe one of the records in your database got removed and another piece of data in your database was relying on that deleted record and is now breaking because it assumes that the deleted record will still be there. Or maybe there is a part of your application that is accidentally morphing the data of a record in your database to something that your application isn't set up to handle!

Either way, like I said, it's a bit tricky to give you a definite answer without knowing your code and how you've set everything up.

In my opinion, the best place to take a look is in your Laravel logs ({project_root}/storage/logs) and see if you can take a look at the full stack trace of the error. If you can get a stack trace, you can often figure out what line of code threw the error, and from there it's a bit of working backwards until you find the answer.

Hopefully that helps and can get you set on the right track!

Best of luck!

1 year ago
Activity icon

Started a new conversation Problem With Laravel Policies & Models

I am currently working on implementing Policies into my application, and I'm working on a policy for the User::show method.

I put a method on my User model called isAdmin() (it does what it says on the tin), and I'm trying to call it within my UserPolicy's view() method, but I'm getting a BadMethodCallException (Method Illuminate\Database\Query\Builder::isAdmin does not exist.)

Is there something I'm missing that is causing my Policy's User $user parameter to be a Builder object instead of a User Model object? I'll paste my code below for reference!

// UserPolicy.php:
class UserPolicy
    use HandlesAuthorization;

     * Determine whether the user can view the model.
     * @param  \App\User  $user
     * @param  \App\User  $model
     * @return mixed
    public function view(User $user, User $model)
        $current_user = User::find($id); // I added this just in case I needed to retrieve the model from the DB

        return ($current_user->isAdmin()) || ($current_user->isInterviewer()) || $user->id === $model->id;

// User.php
class User extends Authenticatable
    use HasApiTokens, Notifiable;

     * The attributes that are mass assignable.
     * @var array
    protected $fillable = [
        'first_name', 'last_name', 'email', 'password',

     * The attributes that should be hidden for arrays.
     * @var array
    protected $hidden = [
        'password', 'remember_token',

     * Checks to see if the current user is an Interviewer
     * @return boolean
    private function isInterviewer() : bool
        return $this->role_mask & 2;

     * Checks to see if the current user is an Admin
     * @return boolean
    private function isAdmin() : bool
        return $this->role_mask & 1;


2 years ago
Activity icon

Replied to Vue Says My Property Isn't Defined, But I Think It Is...?

@bunnypro Ah, I didn't even think to include that--yes, it IS showing up in my Vue Devtools with the correct key.

@vapenation We've already tried that.

Activity icon

Replied to Vue Says My Property Isn't Defined, But I Think It Is...?

@jimmck I tried that and it also didn't work. Also, for the past 3 or so Laravel/Vue projects that I've done, I've never had to put a data object as the value of the key "data" inside the Vue data object--I generally can just put my variables inside the Vue data object. I'm not sure if I'm understanding you correctly though.

2 years ago
Activity icon

Replied to Vue Says My Property Isn't Defined, But I Think It Is...?

@MaverickChan The word "data" can be used as a variable outside of the Vue instance from what I understand from the docs. Changing it had no effect.

@jimmick The data that I have inside my Vue object IS an object. I've tried instantiating it as an object outside the Vue instance and inside both as a global and local variable. I haven't found a working combination in that.

I really don't think it's a problem with the Vue install or anything, because I spun up a new Laravel install and got everything working right off the bat, so I'm not really sure what the problem was. I'll keep searching and post here if I find an answer.

Activity icon

Replied to Vue Says My Property Isn't Defined, But I Think It Is...?

@alenabdula Yeah, that's why I finally decided to come here and see if anyone had any ideas--I think it's something with the way that Laravel is handling it (not necessarily something that was written into the framework, most likely something that I've done wrong haha).

That code doesn't work for some reason, and I'm very not sure as to why.

If it's any help, I tried just taking the vue initialization out of app.js and putting the above code directly into my partial, but I'm still getting the same error: "Property or method "blah" is not defined on the instance but referenced during render..." etc, etc.

Activity icon

Replied to Vue Says My Property Isn't Defined, But I Think It Is...?

@jaydeluca That also didn't work, sadly. This isn't a Vue component, just a regular old instance of Vue, so I don't think data() is correct. I believe that you use data() only when you're creating a template, since the data has to be rendered dynamically as the component is rendered. Could very well be wrong about that though haha. Either way, still no dice. ?

Activity icon

Replied to Vue Says My Property Isn't Defined, But I Think It Is...?

@alenabdula Sadly that didn't do it. It DID hide the h1 though, so "blah" is coming back falsey.

Activity icon

Started a new conversation Vue Says My Property Isn't Defined, But I Think It Is...?

Ok, so I've hit a roadblock and was hoping someone here could lend a hand at figuring out what I'm missing!

I've installed a fresh install of Laravel 5.4 and I'm trying to just simply print out some data from the included VueJS instance in app.js (included below), but I keep getting the "property is referenced but not defined" error. Any chance someone sees my mistake? I think I've been staring at it for too long to find it!

Here's app.js

window.Vue = require('vue');

Vue.component('example', require('./components/Example.vue'));

var data = {
    blah: 'Hello World!',

const app = new Vue({
    el: '#app',
    data: data,

And here's app.blade.php

<!DOCTYPE html>
<html lang="{{ config('app.locale') }}">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!-- CSRF Token -->
    <meta name="csrf-token" content="{{ csrf_token() }}">

    <title>{{ config('') }}</title>

    <!-- Styles -->
    <link href="{{ asset('css/app.css') }}" rel="stylesheet">
    {{-- <link href=",700" rel="stylesheet"> --}}

        <div id="app">

    <!-- Scripts -->
    <script src="{{ asset('js/app.js') }}"></script>

And finally, here's my partial, people.blade.php:


    <section class="hero is-info is-large">
        <div class="hero-body">
            <div class="container">
                <h1 class="title">People: @{{ blah }}</h1>





One more thing to note--the instance is definitely being loaded, because the included Example.vue component works fine!

Thanks in advance for the help!