ejdelmonico

Owner at Del Monico Web Services LLC

Hire Me

Experience

295,705

264 Best Reply Awards

  • Member Since 3 Years Ago
  • 1280 Lessons Completed
  • 1 Favorite

23rd May, 2018

ejdelmonico left a reply on Broadcast Notifications Not Working • 2 hours ago

Did you uncomment the service provider in /config/app.php?

ejdelmonico left a reply on A CSS Question (Bootstrap 4) • 3 hours ago

You are using an iframe which is not responsive.

ejdelmonico left a reply on Traling Data ERROR • 9 hours ago

You shouldn't have to create anything different. Just make sure you have $table->timestamps() in your migration.

ejdelmonico left a reply on Traling Data ERROR • 9 hours ago

Make sure you ran composer update as advised and check the DB for the timestamp format. Make sure it looks correct.

ejdelmonico left a reply on Traling Data ERROR • 9 hours ago

So all you are doing is setting a name? That would mean a normal laravel timestamp is generated if not altered. Have you tried disabling any packages that are used in the model and do not come from the Laravel install?

ejdelmonico left a reply on Traling Data ERROR • 10 hours ago

Check your models for protected $dateFormat which tells eloquent to change the date format or if you protected $casts where you cast a date format in the model.

22nd May, 2018

ejdelmonico left a reply on Traling Data ERROR • 23 hours ago

This error can also appear if the date format is not compatible with a Carbon date instance. If it's not the update that Cronix indicated, then make sure your date formatting hasn't changed in your models.

ejdelmonico left a reply on One Backend With Multiple Frontend? • 1 day ago

@gthell Lumen is Laravel without all the extras and there is no overhead like from the excellent service container. Because of that, Lumen can handle about 1800 basic requests per second when Laravel is more like 60-80. So, Lumen is the right choice if you need an API that will service many entities. But, if you are just providing an API to a few moderate load entities, I would stick with Laravel because of ease in development. Lumen needs a lot of knowlege of whats available in the Laravel ecosystem verses them being already available with Laravel. However, don't forget there are other api frameworks that are fantastic like Loopback and plain node/express.

19th May, 2018

ejdelmonico left a reply on Strange "Cannot Find Module 'shebang-command'" Error On Npm Run Dev • 4 days ago

Seems like you you should remove your vendor and node_modules directories and do the installs again because it would seem like something did not install properly.

ejdelmonico left a reply on Setting Up Spark To Be An SPA? • 4 days ago

Spark is very opinionated and difficult to modify without generating a great deal of technical debt. In other words, if you modify the actual framework, you spend many extra hours troubleshooting issues with each update. I find it best to think of Spark as a complete package to use as a part of a site. Therefore, you can build a normal site around it in a way that you choose. For instance, you can build a Nuxt frontend or plain Vue and use Spark as your backend or just as a signup/dashboard area of a subscription site.

ejdelmonico left a reply on PHPUnit Segmentation Fault On Homestead • 4 days ago

Actually, yes...I have had many issues using xdebug with Phpstorm. If I have an issue where I need xdebug, I use VSCode with xdebug setup per the Tightenco blog article. I was tired of chasing down issues with using it in Phpstorm even though I love there IDE's.

ejdelmonico left a reply on PHPUnit Segmentation Fault On Homestead • 4 days ago

I personally have not had a problem with Phpstorm running tests but I know of an issue dating back a few years that is similar to yours. You can try:

In PhpStorm > Run > Edit Configurations, for Test Runner options:
-d zend.enable_gc=0

18th May, 2018

ejdelmonico left a reply on Granting Access To Forge Site Folder To Additional SFTP User • 5 days ago

Yes, that is the way groups are usually used but I have never tried to add a user to the forge group and I don't know for sure how the permissions were setup during provisioning. I just know that instead of a www or www-data user for nginx, php, node ,etc...forge user takes over those privileges. A forge user for the DB is created as well and I know you can add more in the UI if you don't feel comfortable doing it in the terminal.

ejdelmonico left a reply on Laravel Testing - PHPUnit And PHP Fatal Error: Allowed Memory Size • 5 days ago

Seems like you have a memory leak somewhere in your test setup. I suppose you could just bump up the max allowable memory but I would have to say that the error will occur again if it a memory leak.

ejdelmonico left a reply on Multiple Instances Of Stripe For Testing? • 5 days ago

Yes, they do not provide for multiple instances of the same account. You would have to signup for multiple accounts and painstakingly add all of your setup to each account in test mode.

ejdelmonico left a reply on Factory Unique Relations Seeding. • 5 days ago

First you need your models to be built...like Product. Then you can generate fake products using faker in a factory. It works exactly like the example User model and associated factory.

ejdelmonico left a reply on Granting Access To Forge Site Folder To Additional SFTP User • 5 days ago

Well you definitely don't want to run chown because forge needs to be the owner. You can however add bob to the group and give him adequate privileges. If you change owner to bob, you will have to change everything to bob or you will get many errors.

ejdelmonico left a reply on Getting The Time Difference And Formatting It Using Momentjs • 5 days ago

You can pass a second argument to diff() for units so try diff(started, 'seconds').

ejdelmonico left a reply on Getting The Time Difference And Formatting It Using Momentjs • 5 days ago

For difference between two points in time, I would choose to use duration() for that. It's easy to use. But, for your issue, use seconds(). I don't remember moment as having an asSeconds method.

ejdelmonico left a reply on Get The Sum Of Prices With Javascript • 5 days ago

It's pure javascript. In PHP, you can use array_sum() or in Laravel sum() like this:

collect([1, 2, 3, 4, 5])->sum();

16th May, 2018

ejdelmonico left a reply on Can't Use Sessions In Laravel Controller • 1 week ago

As these other folks pointed out, maybe Laravel is not the choice for you because it was written to help avoid spaghetti code like yours. I hope your controller is just a rough draft because its a giant mess. And just so you fully understand, it does not matter that you have legacy php code. A php session is always a php session. If you would explore what Laravel makes easy, you could remove most of that code. Read the docs if you care about doing it right.

ejdelmonico left a reply on Include Custom CSS • 1 week ago

All messages in the console and Laravel generics are 404. I looked at your links and the only thing that seems a likely candidate is the file is simply not in the public/css/ directory or the file name is different than what is in your link.

ejdelmonico left a reply on 401 Error : "Unauthenticated." • 1 week ago

It is usually expected that you show all relevant code when asking a question. However, if you are getting a 401 from the login, you are not logged in and if you are infact getting the redirect, then that login page may inadvertently be expecting a logged in user.

ejdelmonico left a reply on Struggling With Vuex Computed Properties • 1 week ago

Hmm, that makes it a bit better to understand your context. Try logging to console the state values before and after you commit. By the way, you can destructure commit from the context by using { commit } in place of the context param. Also, you may find it easier to use async/await instead of axios or utilize a setTimeout of say 3s to help troubleshoot.

ejdelmonico left a reply on Get The Sum Of Prices With Javascript • 1 week ago

Save all prices coming from the DB into an array and use a forEach to add them up or use the reduce protoype.

[1,2,3,4,5].reduce(function(accumulator, val) {
  return accumulator + val;  // 
});

ejdelmonico left a reply on Struggling With Vuex Computed Properties • 1 week ago

You don't have to map getters so you can use them in computed properties but it is recommended. You can just do this.$store.getters.getUsers to access them.

15th May, 2018

ejdelmonico left a reply on Homestead Hell :( • 1 week ago

For sure. You only have to make that mistake once. Haha

ejdelmonico left a reply on Homestead Hell :( • 1 week ago

Well, for the future, whenever I have to use Windows and I uninstall a tool, I uninstall it with CCleaner and then clean up the registry with the included tool. Works great and lasts a very long time. But, to be clear, I rarely do projects on a Windows box.

ejdelmonico left a reply on Struggling With Vuex Computed Properties • 1 week ago

Are you mapping the getters in the Vue component? There is a mapGetters helper from Vuex.

https://vuex.vuejs.org/en/getters.html

ejdelmonico left a reply on Counter With JS/Laravel • 1 week ago

What error messages do you get in the console? If you want help, you are going to have to tell us the context of the problem. Right now, I see you haven't declared countany where expect inside the if statement. You have a data property with a key of count you are sending with the request. If you want to retain the value of count, you should initiate the variable outside and above the jquery you have lisited.

ejdelmonico left a reply on Homestead Hell :( • 1 week ago

I have both running on a Windows 10 box (lastest) and my Macbook Pro(latest) with Vagrant 2.1.1, VirtualBox with tools v5.2.12 and the latest Homestead and Homestead box. Maybe it is something else interfering with the install. Did you destroy the old box build before running vagrant up?

ejdelmonico left a reply on Which Laptop To Buy? • 1 week ago

Buy whatever you can afford and that you prefer. You can start off using either Cloud9 IDE or CodeAnywhere IDE. Cloud9 can be tuned any way you want and you can even use a Chromebook if necessary. I have used Cloud9 (specs won't matter for the device) on a few large projects with teams ranging from 12 to 16 and it was actually not bad. However, my personal preference is to develop locally on my Macbook Pro 15.

14th May, 2018

ejdelmonico left a reply on Laravel Mix And React Js • 1 week ago

If using React 16 then the shortened version of declaring state will work just fine. So, you didn't declare anything wrong in the state object. It is no longer required to write a constructor just for state. Make sure you have imported import { React, Component } from 'react' at the top of the component file.

13th May, 2018

ejdelmonico left a reply on Centos Server Web Service Fail To Start • 1 week ago

Check your permissions for the web service (httpd) user.

12th May, 2018

ejdelmonico left a reply on Need Help Refactoring This Piece Of Code • 1 week ago

Have you looked at using a scope in the model? Here is a link to the docs:

https://laravel.com/docs/5.6/eloquent#query-scopes

ejdelmonico left a reply on Where To Put Validation Rules If I Don't Want Them To Be Presented In My Controller • 1 week ago

Use a form request and inject it into the create or store method in the controller,

ejdelmonico left a reply on React Props Value • 1 week ago

You can get some help here, I was merely stating the way it appears and the fact that your question is addressed in the docs.

Basically, a prop in React is just a short name for properties and they are passed in JSX as attributes. You can pass them from parent to child and can usually access them through this.props. If you want to use a prop from a parent component, then you need to accept that prop in the child.

https://codepen.io/ejdelmonico/pen/BxxXXG

11th May, 2018

ejdelmonico left a reply on Route Gets Redirected Eventhough I Didnt Specify Redirection In Controller • 1 week ago

Try using something like this:

Route::middleware('auth:api')-> get('/recover', '[email protected]');

The App\Http|Kernel.php should have the rules for the api.

ejdelmonico left a reply on React Props Value • 1 week ago

Honestly, this looks like code you copied from somewhere and changed a few things and wonder why its not working. You should go through the React docs to learn about props and how and when to use them.

ejdelmonico left a reply on One Backend With Multiple Frontend? • 1 week ago

You can use Lumen for a high volume API or Laravel for an easier to develop low volume API. You can use Passport and a CORS package from Spatie. Just setup the auth with Passport for the front-end apps you want to have access.

ejdelmonico left a reply on Unexpected Behaviour For Vue Transition • 1 week ago

Obviously, you need to emit events like in every other JS component. It really isn't complicated but it does require more than one component to achieve. I use a TheSideNav.vue component that contains the transitions and the markup for the actual slide out menu whether it be vertical or horizontal. I then use TheSideNavToggle.vue component toggle the other component. By using two components, I get plenty of flexibility and it works perfectly. If you want to see a horizontal version in production (and please let me know if you find any issues), you can use the small screen dev tools in Chrome to look at https://delmonicowebservices.com and simulate a click on the hamburger menu.

ejdelmonico left a reply on Issue Accessing A Method From One Vue Component From Another • 1 week ago

You can use a mixin for that and use it in components that require it.

https://vuejs.org/v2/guide/mixins.html

ejdelmonico left a reply on Directory Permissions On Forge • 1 week ago

Everything should be set up correctly unless you modified permissions yourself. The forge user has the required permissions to serve any website. Also, Forge will perform security updates on a regular basis for you.

10th May, 2018

ejdelmonico left a reply on How To Correctly Require A Node Module In Your Js File • 1 week ago

I see you requiring jquery-validate and attaching to the window as jqueryvalidation. So see if that is available in the console.

Note: jQuery can cause major issues for you in a Vue or React app because neither of them will behave if you manipulate the DOM without them knowing about it when they control that portion of the page. Hence, you end up with a lot of wasted time and a very broken app when it happens.

ejdelmonico left a reply on How To Embed Tweets In A Page? • 1 week ago

Are you trying to modify one of the Spark templates provided from the framework? You don't have to use those that are not in the spark directories. I am not a fan of the way Taylor used Vue in Spark but it is a heavily opinionated offering so that is just the way he does it. So, he provides a home.js file in the components directory. In that file, he constructing a component and registering it at the same time (not a fan of that but anywho). So, it is not a view component but a functional one so you two choices: you can build off of that and use Blade for the view or you can ignore it and make a single file Vue component...which I recommend if you are not going to use his vast supply of confusing mixins (again not a fan of those either).

If it were me, I would opt for the single file component. The basic template is:

<template>
  <div>Your html goes here</div>
</template>

<script>
  import {Tweet, Moment, Timeline} from 'vue-tweet-embed';

  export default {
    name: 'YourFancyComponent',
    components: {
    },
    ....
  }
</script>

<style scoped>
  /* Your scoped or non-scoped styles here */
</style>

ejdelmonico left a reply on Unexpected Behaviour For Vue Transition • 1 week ago

You can probably just use a variation of what I gave you. Just translateY() and use height instead of width. It should work smoothly like it works for me on a slide out menu.

ejdelmonico left a reply on [Vue + Passport + AJAX] Successful Login But Being Redirected Back To Login • 1 week ago

If Postman is giving a 404 error instead of a 401, then I would have a good look at your routes or use of middleware. If you are unable to authenticate, then a 401 should be thrown. The proper redirect should happen in the then() part of the promise before exiting the method. My guess is that Laravel routing is redirecting to login.

ejdelmonico left a reply on How To Set Only One Validation Error Message To Three Fields • 1 week ago

You can make a custom validation rule and apply it to all three items. There is a pretty good explanation on how to do it in the docs

https://laravel.com/docs/5.6/validation#custom-validation-rules

ejdelmonico left a reply on ErrorException • 1 week ago

In case you are not aware, PHP 7.2 has changed the count() method per https://wiki.php.net/rfc/counting_non_countables. This is why you are getting the exception error.

ejdelmonico left a reply on How To Embed Tweets In A Page? • 1 week ago

I will assume you only want to use these components in a particular page view. My suggestion would be to use a standard ES6 import statement that destructs the objects you are going to use from the package. Go to your project root and run npm install vue-tweet-embed or yarn ... if using it. Then, in the script tag of your component and above the export default you can use import { Tweet, Moment, Timeline } from 'vue-tweet-embed' (or whatever objects you are using from the package). Now, you have access to Tweet, Moment, and Timeline in your component.

Edit Your Profile
Update

Want to change your profile photo? We pull from gravatar.com.