ejdelmonico

ejdelmonico

Owner at Del Monico Web Services LLC

Member Since 4 Years Ago

Las Vegas, NV

Experience Points
343,265
Total
Experience

0 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
1563
Lessons
Completed
Best Reply Awards
288
Best Reply
Awards
  • 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.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.

    Lifer

    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 50
343,265 XP
Oct
10
1 week ago
Activity icon

Replied to Laravel 6 : Permanent 419 Error With CSRF Token Mismatch Error

Make sure you clear the browser caches. Browser may be caching the old token.

Activity icon

Replied to How To Send An Nova Authenticated HTTP Request Using Axios ?

Are you including the api route as a string in get()?

Nova.request().get('/nova-vendor/stripe-inspector/endpoint').then(response => {
    // ...
})
Activity icon

Replied to Homestead Update Confusion

When you upgrade the box, you should destroy the old vm instance by vagrant destroy --force, download the new box and run vagrant up.

Activity icon

Replied to Pass Down Selected Checkboxes From Child To Parent

Well, $emit is using the event bus in Vue. As far as improvements, if the project frontend will continue to grow, you should consider Vuex. It's not at all hard to use and there are plugins for persisted state, cookies, etc.

Activity icon

Replied to Pass Down Selected Checkboxes From Child To Parent

In Vue, you can simply use Vuex to manage all state in the frontend. However, it sounds like you keeping it simple so to pass data from the parent to the child use props. To notify the parent of a change in the child, use an event bus.

Activity icon

Replied to Have Bootstrap Modal Open After Ajax Loads Data

Use a promise and open the modal in a then() statement so that the data fetch is good beforehand.

Aug
30
1 month ago
Activity icon

Replied to VueX Store Usage

You can store the initial request in the session and every time you need to filter, you can check if the session has posts...if not, fetch them. Just do JS filtering instead of refetching every time a new filter is selected. Also, you could store the initial request for all posts in the Vuex store and follow the same process.

Aug
28
1 month ago
Activity icon

Replied to Can't Access A Variable Relations In View Laravel 5.8

Your pivot table name should be changed to project_role by Laravel convention. The rule is that the singular table names are to be used in alphabetical order.

Aug
27
1 month ago
Activity icon

Replied to Auth() Helper Is Not Working On Middleware

You can access the currently signed-in user's id with $id = Auth::id();

Activity icon

Replied to Using Laravel Passport With Vue.js

You need to refer to the docs for vue-router. https://router.vuejs.org/guide/advanced/meta.html

If you add meta: { requiresAuth: true } to a route, vue-router will store that meta in $route object. You will need a beforeEach to check for routes that require auth. Here is an example to be placed in your router file.

router.beforeEach((to, from, next) => {
  if (to.matched.some(record => record.meta.requiresAuth)) {
    // this route requires auth, check if logged in
    // if not, redirect to login page.
    if (!auth.loggedIn()) {
      next({
        path: '/login',
        query: { redirect: to.fullPath }
      })
    } else {
      next()
    }
  } else {
    next() // make sure to always call next()!
  }
})
Aug
25
1 month ago
Activity icon

Replied to Using Laravel Passport With Vue.js

You can configure axios to pass the token with every request using window.axios.defaults.headers.common['Authorization'] or you can pass it individually with each request. You can store the token locally in an encrypted cookie or in the non-secure localStorage.

Activity icon

Replied to Use Sweet Alert Inside VUEX

Maybe you should re-phrase the question because Vuex is only used to manage application state. You can not use SweetAlert inside Vuex. What you can do is store a boolean for whether it should be open or closed. You can create a Vue wrapper component for SweetAlert that passes in a boolean prop to open/close it and also a prop containing the message to display. The, you can create a Vuex action, mutation and getter to call inside your other component or views.

Activity icon

Replied to Store() Paths

You can create the public-facing URL with the asset('uploads/your_file') helper. Or, you can use Storage::url()

Aug
24
1 month ago
Activity icon

Replied to How To Do When The Vue JS Component Is Very Large ?

You can break the methods out into a separate file (using: export const someMethod) and then import them in the component.import { someMethod } from './someComponent' Also, you cab refactor some functionality into a smaller component to be used in the parent component. If there is common functionality with other components, consider using a mixin for those items.

Aug
22
1 month ago
Activity icon

Replied to Install Nova 2.1 Via Composer

Hmm, that is odd. Try using the login info for the auth.json. Both of my current projects upgraded without an issue to the latest version.

Activity icon

Replied to Install Nova 2.1 Via Composer

You will need "laravel/nova": "^2.0" in the require section of composer.json. Also, in the"repositories"` section:

"repositories": [
   {
     "type": "composer",
     "url": "https://nova.laravel.com"
   }
]

When you perform the request the first time, it should offer to create an auth.json file for you with your access credentials. If not, you can easily create it yourself.

{
  "http-basic": {
    "nova.laravel.com": {
      "username": "your email for nova",
      "password": "your nova password"
    }
  }
}
Aug
21
1 month ago
Activity icon

Replied to Passport Authentication

The code you have posted looks good to me. I use the same basic code.

Aug
19
1 month ago
Activity icon

Replied to Passport Personal Access Token Refresh

Did you set the token times in the boot method of AuthServiceProvider?

In the docs, there are examples of setting the refresh token and personal access token expiration times. You can see them at the following link.

https://laravel.com/docs/5.8/passport#configuration

Aug
15
2 months ago
Activity icon

Replied to Packages

You can do an npm audit to check for packages with known vulnerabilities.

Aug
12
2 months ago
Activity icon

Replied to How To Make Any Route Except For '/login/'

Try this:

Route::get('/{any?}', '[email protected]')->where('any', '^(?!login).*$');
Aug
06
2 months ago
Activity icon

Replied to Advice Regarding Scheduled Tasks

You can run your job that way. However, the server still needs to be instructed to run a scheduled job. For instance, in Laravel Forge servers, there is a wrapper around cron jobs and you would schedule:

php /home/forge/mysite.com/artisan schedule:run

daily at the appropriate time of day. This will run any appropriate scheduled jobs listed in kernel.php.

Activity icon

Replied to How To Have A Tags Field In Laravel Based Form ?

Have a look at https://github.com/spatie/laravel-tags

The package works very well and the docs are sufficient.

Activity icon

Replied to 403 - This Action Is Unauthorized

You have $this->middleware('auth'); in the constructor so all resources need an authorized and signed-in user. And, yes, you listed the wrong controller in your route.

Aug
05
2 months ago
Activity icon

Replied to Async And Await Not Working

In an async function, the code continues to run even though you have an await function so that is probably why you are only getting the else to run. Set the await function equal to a variable and the promise will return the result when it completes. Then, just return the variable.

const result = await this.$validator.validateAll()

Aug
04
2 months ago
Activity icon

Replied to Router Link Not Working

For vue-router to work with Laravel, you need a controller that captures route requests and points them to the frontend. The easiest way is to use a Blade layout template and a controller that directs to that view.

\* web.php - example *\
Route::get('/{any?}', '[email protected]')->where('any', '^(?!nova|admin|horizon).*$');
\* that means capture all route requests except those for nova or admin or horizon *\

\* controller *\
public function index()
    {
        return view('layouts.app');
    }
Activity icon

Replied to Vue Component Not Showing

You used an _ instead of a-. Try changing to the dash for globally registering the component and its usage.

Aug
03
2 months ago
Activity icon

Replied to Where To Put The OAuth2 Access_token ?

I would use an encrypted cookie and I do most times. However, with such a short valid time, I might consider storing the token in localStorage. However, that would depend on what the token gives access to. If the user has edit, update, create and destroy permissions, then I would NOT use localStorage.

Activity icon

Replied to Passing Auth User To JavaScript

For me, I save the user in an encrypted cookie so that I can use it in my Vue or React frontend. It is secure and will provide a means to access the data easily. Specifically, I use js-cookie with encrypted set to true.

Activity icon

Replied to Vuejs And Laravel Help

Maybe you could describe your use case in a bit more detail so we understand. When you say "vuejs project", it makes me think you are using a vue spa with a node backend. Maybe show us the relevant code so we can help you better.

Activity icon

Replied to AWS S3 Private Images

If you don't make them public, you would have to access them programmatically with an IAM user you set up for it. But, for guest users, etc public is what you need. I am in no way an expert with AWS but that is the way I have used it.

So, for a logged in user, I would suggest you access the images programmatically with an IAM user you have setup. This way you can keep the bucket private.

Activity icon

Replied to Nova Computed Field Being Ignored

I can't pinpoint why your computed field is not working but maybe it is being resolved in the wrong place. Try this:

$this->when($this->user, function () {
    return Text::make('Name', function () {
        return 'test';
    })
});

Just curious to see if this works. The solution is related to the github issue: https://github.com/laravel/nova-issues/issues/826

Jul
31
2 months ago
Activity icon

Replied to Calculate Price With Checkbox

Sure, the docs have a great explanation at https://vuejs.org/v2/guide/forms.html#Checkbox

Give a hard look at how the id, v-model, value are used. Just remember that an array is returned for multiple checkboxes. You may want to consider switching to radio buttons. The docs for that are right below on the same page.

Activity icon

Replied to Calculate Price With Checkbox

Try console.log(typeof this.value). If it is an array, checkboxes are causing that and you should either switch to radio buttons or use this.value[0].

Jul
30
2 months ago
Activity icon

Replied to Calculate Price With Checkbox

Have you tried console.log(this.value) to see what is returned for each of them? Normally, when I have a use case like yours, I would use a radio button when only one item at a time can be selected because it gives you one value. I use a checkbox because it allows you to have an array of values given by the ticked checkboxes. If you are going to use checkboxes, each should have an id, value and the same v-model. This will make an array of values based on the ticked checkboxes. If you really only want 1 value, then use radio buttons.

Jul
28
2 months ago
Activity icon

Replied to Empty Varible On Edit Function

Looks like to me that you are not finding the model to edit so you are providing no data to fill in.

Jul
27
2 months ago
Activity icon

Replied to Calculate Price With Checkbox

You can not use price because of the previously mentioned scope. Use this.price in the calculation.

Jul
26
2 months ago
Activity icon

Replied to 500 Server Error With Guzzle On Lumen

Check the Laravel logs.

Activity icon

Replied to Laravel Version

Well, that's pretty simple. If you are looking for an LTS version, then 5.5 is your winner. If starting a new project and you are not required to have an LTS version, then 5.8 is the latest until August at which time 6.0 will be out.

Jul
23
2 months ago
Activity icon

Replied to Update User Informations

Have a look at the docs, this may help.

https://laravel.com/docs/5.8/routing#form-method-spoofing

Use the following for a PUT request: @method('PUT')

Activity icon

Replied to Error Migrating Tables For Bitfumes/laravelAuth Package On Laravel 5.8

Place this in the boot method of AppServiceProvider.php

Schema::defaultStringLength(191);
Jul
18
2 months ago
Activity icon

Replied to API Authentication With Vue And Standard Authentication

If you use Passport and the provided middleware, everything will be done for you. As far as auth, I just create the views as Vue components and list the auth routes that I am using in api.php.

Jul
17
3 months ago
Activity icon

Replied to Unable To Send Mails And Gets Authentication Required Message

I believe you need the Auth:routes(['verify' => true]) in the web.php file. Try running php artisan route:list and see what it gives you in the current configuration.

Jun
26
3 months ago
Activity icon

Replied to Vuex Store

Sounds like a global mixin that gets the value from the store could be used in that scenario. However, there is always more than one way to handle it.

Activity icon

Replied to Command "php Artisan Optimize" Throwing Errors Re Some Routes W/ Closures

To return a view without a closure, you add it to the relevant controller.

Route::get('test', [email protected]);

// in controller
public function index()
{
    return view('test');
}
Activity icon

Replied to Laravel Passport | Login/Register Redirects To Welcome Page

Just add public $redirectTo = '/' in the appropriate controller. You can put whatever route you want by overriding $redirectTo.

Jun
24
3 months ago
Activity icon

Replied to Route Error Forbidden

You did include @csrf in your form, correct? Are you getting a 403 error?

Jun
20
3 months ago
Activity icon

Replied to Moment Package Add Some Javascript In My Css File

Show your webpack.mix.js file and tell us how you included moment in the project.