fullstackfox16

fullstackfox16

Member Since 1 Year Ago

Stephenson

Experience Points 18,000
Experience Level 4

2,000 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 177
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.

13 Jul
8 months ago

fullstackfox16 left a reply on Testing A Many To Many Relationship

Here is the answer! Instead of just using the make method on the pin instance, I used the create method and persisted it to the database, then just removed the post action. See below:

/** @test */
public function a_pin_can_belong_to_a_board()
{
    $board = create('App\Board');
    $pin = create('App\Pin');

    $pin->boards()->sync($board);

    $this->assertDatabaseHas('board_pin', [
        'board_id' => $board->id,
        'pin_id' => $pin->id
    ]);
}

fullstackfox16 started a new conversation Testing A Many To Many Relationship

I have a Board model and a Pin model, and they are many to many. I am testing to make sure that when a pin gets created and assigned a board, it saves to the pivot table. I am having trouble figuring this out since I am new to testing.

Here is my Test:

/** @test */
    public function a_pin_can_belong_to_a_board()
    {
        $board = create('App\Board');
        $pin = make('App\Pin');

        $response = $this->post('/pins/create', $pin->toArray());

        $pin->boards()->sync($board);

        $this->assertDatabaseHas('board_pin', [
            'board_id' => $board->id,
            'pin_id' => $pin->id
        ]);
    }

Here is my Error:

1) Tests\Unit\PinTest::a_pin_can_belong_to_a_board
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 19 NOT NULL constraint failed: board_pin.pin_id (SQL: insert into "board_pin" ("board_id", "pin_id") values (1, ))

Caused by
PDOException: SQLSTATE[23000]: Integrity constraint violation: 19 NOT NULL constraint failed: board_pin.pin_id

Any help would be greatly appreciated! Thank you!

10 Jul
8 months ago

fullstackfox16 left a reply on Uncaught ReferenceError: Vue Is Not Defined

Yes I have and the error remains

fullstackfox16 started a new conversation Uncaught ReferenceError: Vue Is Not Defined

I can't figure out why I'm getting this error

app.js:1041 Uncaught ReferenceError: Vue is not defined at Object.VERSION (app.js:1041) at __webpack_require__ (app.js:20) at Object.<anonymous> (app.js:980) at __webpack_require__ (app.js:20) at Object.<anonymous> (app.js:965) at __webpack_require__ (app.js:20) at app.js:63 at app.js:66 Here is my app.js

`/**

  • First we will load all of this project's JavaScript dependencies which
  • includes Vue and other libraries. It is a great starting point when
  • building robust, powerful web applications using Vue and Laravel. */

require('./bootstrap');

window.Vue = require('vue');

Vue.config.devtools = true;

/**

  • Next, we will create a fresh Vue application instance and attach it to
  • the page. Then, you may begin adding components to this application
  • or customize the JavaScript scaffolding to fit your unique needs. */

Vue.component('flash', require('./components/Flash.vue')); Vue.component('reply', require('./components/Reply.vue'));

const app = new Vue({ el: '#app' }); `

Here is my bootstrap.js

` window._ = require('lodash');

/**

  • We'll load jQuery and the Bootstrap jQuery plugin which provides support
  • for JavaScript based Bootstrap features such as modals and tabs. This
  • code may be modified to fit the specific needs of your application. */

try { window.$ = window.jQuery = require('jquery');

require('bootstrap-sass');

} catch (e) {}

/**

  • We'll load the axios HTTP library which allows us to easily issue requests
  • to our Laravel back-end. This library automatically handles sending the
  • CSRF token as a header based on the value of the "XSRF" token cookie. */

window.axios = require('axios');

window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';

/**

  • Next we will register the CSRF Token as a common header with Axios so that
  • all outgoing HTTP requests automatically have it attached. This is just
  • a simple convenience so we don't have to attach every token manually. */

let token = document.head.querySelector('meta[name="csrf-token"]');

if (token) { window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content; } else { console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token'); }

window.events = new Vue();

window.flash = function (message) { window.events.$emit('flash', message); }; `

Any help would be greatly appreciated! Thanks in advance!

09 Apr
11 months ago

fullstackfox16 left a reply on Uncaught TypeError: Cannot Read Property 'closed' Of Undefined

there i have formatted my code properly! do you know how to help me fix it?

fullstackfox16 left a reply on Uncaught TypeError: Cannot Read Property 'closed' Of Undefined

i dont know why the code displays weird in the post

fullstackfox16 left a reply on Uncaught TypeError: Cannot Read Property 'closed' Of Undefined

`

    <input type="hidden" name="stripeToken" v-model="stripeToken">
    <input type="hidden" name="stripeEmail" v-model="stripeEmail">

    <button type="submit" @click.prevent="buy">Buy my book</button>
</form>

export default { data() { return { stripeEmail: '', stripeToken: '' }; }, created() { this.stripe = StripeCheckout.configure({ key: "{{ config('services.stripe.key') }}", image: "https://stripe.com/img/documentation/checkout/marketplace.png", locale: "auto", token: (token) => { this.stripeToken = token.id; this.stripeEmail = token.email;
                axios.post('/purchases', this.$data)
                    .then(response => alert('Complete! Thanks for the payment!'))
            }
        });
    },

    methods: {
        buy() {
            this.stripe.open({
                name: 'My book',
                description: 'Some details about the book.',
                zipCode: true,
                amount: 2500
            });
        }
    }
}
`

fullstackfox16 started a new conversation Uncaught TypeError: Cannot Read Property 'closed' Of Undefined

I am following the stripe series and when i got to the video that integrates vue i got this error

Uncaught TypeError: Cannot read property 'closed' of undefined at IframeView.closed (checkout.js:3) at Object.closed (checkout.js:3) at RPC.processMessage (checkout.js:2) at RPC.processMessage (checkout.js:2) at RPC.message (checkout.js:2) at checkout.js:2

I don't really know much about vue so if anyone could help that would be great!

here is my component

    <input type="hidden" name="stripeToken" v-model="stripeToken">
    <input type="hidden" name="stripeEmail" v-model="stripeEmail">

    <button type="submit" @click.prevent="buy">Buy my book</button>
</form>

export default { data() { return { stripeEmail: '', stripeToken: '' }; }, created() { this.stripe = StripeCheckout.configure({ key: "{{ config('services.stripe.key') }}", image: "https://stripe.com/img/documentation/checkout/marketplace.png", locale: "auto", token: (token) => { this.stripeToken = token.id; this.stripeEmail = token.email;
                axios.post('/purchases', this.$data)
                    .then(response => alert('Complete! Thanks for the payment!'))
            }
        });
    },

    methods: {
        buy() {
            this.stripe.open({
                name: 'My book',
                description: 'Some details about the book.',
                zipCode: true,
                amount: 2500
            });
        }
    }
}
22 Sep
1 year ago

fullstackfox16 left a reply on Link To Edit Specific Database Item

Im sorry, I'm new to php and laravel so I don't understand that. Could you please look at my code on GitHub and let me know?

fullstackfox16 left a reply on Link To Edit Specific Database Item

Im sorry, I'm new to php and laravel so I don't exactly understand all that, could you please look at my code in git hub?

fullstackfox16 started a new conversation Link To Edit Specific Database Item

I am new to laravel so I am building a basic task app to cement the fundamentals in my head.

Here is my project: https://github.com/fullstackfox16/laravel-task

I have a route and a view set up with a form to edit a task, tho I don't have anything set to actually edit the task. I also have a view to display the task by itself. I want to add a button on the single task page to edit the task but I can't figure out what to put in the "href". Let me know if I am not being specific enough. any help would be greatly appreciated! Thank you in advance!

03 Sep
1 year ago

fullstackfox16 started a new conversation Laravel Installer

I have gotten all set up with larval 5.4 using the laravel installer to make a new app

"laravel new example"

Laravel 5.5 just released and without doing anything different I went to use the command to make a fresh copy of laravel and it gives me this:

iMac% laravel new blog PHP Warning: require(/Users/logan/.composer/vendor/composer/../guzzlehttp/psr7/src/functions_include.php): failed to open stream: No such file or directory in /Users/logan/.composer/vendor/composer/autoload_real.php on line 66

Warning: require(/Users/logan/.composer/vendor/composer/../guzzlehttp/psr7/src/functions_include.php): failed to open stream: No such file or directory in /Users/logan/.composer/vendor/composer/autoload_real.php on line 66 PHP Fatal error: require(): Failed opening required '/Users/logan/.composer/vendor/composer/../guzzlehttp/psr7/src/functions_include.php' (include_path='.:') in /Users/logan/.composer/vendor/composer/autoload_real.php on line 66

Fatal error: require(): Failed opening required '/Users/logan/.composer/vendor/composer/../guzzlehttp/psr7/src/functions_include.php' (include_path='.:') in /Users/logan/.composer/vendor/composer/autoload_real.php on line 66

I have looked at the upgrade page on laravel.com but I can't figure out how to do it since I'm so new to all of this. Any help would be greatly appreciated! Thanks in advance!