ejdelmonico

ejdelmonico

Member Since 4 Years Ago

Las Vegas, NV

Owner at Del Monico Web Services LLC

Experience Points 339,895
Experience Level 50

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 1532
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.

30 Aug
2 weeks ago

ejdelmonico left a reply on 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.

28 Aug
2 weeks ago

ejdelmonico left a reply on 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.

27 Aug
2 weeks ago

ejdelmonico left a reply on Auth() Helper Is Not Working On Middleware

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

ejdelmonico left a reply on 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()!
  }
})
25 Aug
3 weeks ago

ejdelmonico left a reply on 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.

ejdelmonico left a reply on 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.

ejdelmonico left a reply on Store() Paths

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

24 Aug
3 weeks ago

ejdelmonico left a reply on 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.

22 Aug
3 weeks ago

ejdelmonico left a reply on 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.

ejdelmonico left a reply on 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"
    }
  }
}
21 Aug
3 weeks ago

ejdelmonico left a reply on Passport Authentication

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

19 Aug
4 weeks ago

ejdelmonico left a reply on 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

15 Aug
1 month ago

ejdelmonico left a reply on Packages

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

12 Aug
1 month ago

ejdelmonico left a reply on How To Make Any Route Except For '/login/'

Try this:

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

ejdelmonico left a reply on 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.

ejdelmonico left a reply on 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.

ejdelmonico left a reply on 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.

05 Aug
1 month ago

ejdelmonico left a reply on 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()

04 Aug
1 month ago

ejdelmonico left a reply on 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');
    }

ejdelmonico left a reply on Vue Component Not Showing

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

03 Aug
1 month ago

ejdelmonico left a reply on 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.

ejdelmonico left a reply on 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.

ejdelmonico left a reply on 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.

ejdelmonico left a reply on 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.

ejdelmonico left a reply on 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

31 Jul
1 month ago

ejdelmonico left a reply on 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.

ejdelmonico left a reply on 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].

30 Jul
1 month ago

ejdelmonico left a reply on 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.

28 Jul
1 month ago

ejdelmonico left a reply on 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.

27 Jul
1 month ago

ejdelmonico left a reply on Calculate Price With Checkbox

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

26 Jul
1 month ago

ejdelmonico left a reply on 500 Server Error With Guzzle On Lumen

Check the Laravel logs.

ejdelmonico left a reply on 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.

23 Jul
1 month ago

ejdelmonico left a reply on 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')

ejdelmonico left a reply on Error Migrating Tables For Bitfumes/laravelAuth Package On Laravel 5.8

Place this in the boot method of AppServiceProvider.php

Schema::defaultStringLength(191);
18 Jul
1 month ago

ejdelmonico left a reply on 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.

17 Jul
1 month ago

ejdelmonico left a reply on 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.

26 Jun
2 months ago

ejdelmonico left a reply on 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.

ejdelmonico left a reply on 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');
}

ejdelmonico left a reply on 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.

24 Jun
2 months ago

ejdelmonico left a reply on Route Error Forbidden

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

20 Jun
2 months ago

ejdelmonico left a reply on 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.

ejdelmonico left a reply on Form POST Not Working

First, you should replace the closing form tag and the submit button with:

<div class="form-group">
  {!! Form::submit('Create', ['class' => 'btn btn-sm btn-primary']) !!}
</div>
{!! Form::close() !!}
18 Jun
2 months ago

ejdelmonico left a reply on Vue And Mix Vendor Extraction

Are you sure you are putting all three js source files in the correct order? My projects work fine with including them at the end of the body. Your scripts should be something like:

<script src="/js/manifest.js"></script>
<script src="/js/vendor.js"></script>
<script src="/js/app.js"></script>
01 Jun
3 months ago

ejdelmonico left a reply on Dynamic V-model

When you fill out the input, what is displayed in vue-tools?

ejdelmonico left a reply on Installing Two Laravel Apps On Same Server

Did you allow enough time for the DNS to propagate? GoDaddy is notoriously slow and could take a few days. Also, make sure your .env file is updated for APP_URL to refer to the subdomain. There are many tools to check your DNS to make sure it is correct.

ejdelmonico left a reply on Dynamic V-model

Please post the full component code.

ejdelmonico left a reply on Laravel Nova Access Restriction Vie Gate Does Not Work

Then, try using Tinker to see if the user model actually has the role_id attached. Pick any user with Tinker to see the returned model.

31 May
3 months ago

ejdelmonico left a reply on Running Npm Run Prod In Production

I think most devs run npm run prod after deploying. That is what it is for...especially if using versioning. When you do, the manifest is updated for the hash change and the new js and css files will be called as long as you are using the mix() helper in your layout. For a basic Laravel site:

php artisan cache:clear
php artisan route:clear
php artisan route:cache
php artisan config:clear
php artisan config:cache

npm install
npm run prod