Owner at Del Monico Web Services LLC



156 Best Reply Awards

  • Member Since 2 Years Ago
  • 1080 Lessons Completed
  • 1 Favorite

9th July, 2017

ejdelmonico left a reply on Login With Username? • 2 weeks ago

@kiogo In 5.4, you can just override the credentials method in the login controller. Fore example, here is a sample that adds an is_active requirement to login requirements.

  * Override the credential method for login
  * @param \Illuminate\Http\Request $request
  * @return array
protected function credentials(Request $request)
    return array_merge($request->only($this->username(), 'password'), 
          ['is_active' => 1]);

28th June, 2017

ejdelmonico left a reply on Need To Update A Site From 3.2.12 To 5.5 • 4 weeks ago

@laurent1979 My advice to you is to start with a fresh install of Laravel 5.5 (it should be released very soon) laravel new laravel55 --dev and start over with the old project as a reference. Believe me, it will save you time over the course of the project. Otherwise, you will spend a lot of time trying to upgrade without any easy solutions. It will frustrate you to attempt an upgrade from the old code base. Starting from that new project will make it a whole lot easier and you can easily use the new features in Laravel. If you have tests, then the process will be even easier.

27th June, 2017

ejdelmonico left a reply on Validation Rules Abstraction • 4 weeks ago

I would have to agree with @snapey to use a form request for validation. You can use that request in more than one controller.

ejdelmonico left a reply on Can't Figure Out How To Start With Gate • 4 weeks ago

Try this article

ejdelmonico left a reply on Auth Forms Load Slow • 4 weeks ago

@marins You will need to provide more information than that!

  • What version of Laravel?
  • How are you serving the dev site?
  • Did you run npm install?
  • What OS are you using?

I would think that your dev server environment is the most likely cause.

ejdelmonico left a reply on Using Flatpickr W/ Webpack • 4 weeks ago

The package is probably not exported as a module so you can either do an ES6 import or do as @retracenz suggested and define it in /resources/assets/js/app.js by attaching it to the window (global).

ejdelmonico left a reply on Form With Several Route • 4 weeks ago

You can prevent the default action of the button and use javascript to submit the form with the correct data.

ejdelmonico left a reply on Laravel Mix With Bower Package • 4 weeks ago

You could use the copy command to place the file into the resources directory and then configure webpack normally. Just make sure you perform the copy before calling for the resource in another method. I usually set up a path variable if more than one package is a directory other than node_modules.

23rd June, 2017

ejdelmonico left a reply on Limiting "{!! $text !!}" • 1 month ago

Using the TinyMCE editor in a textarea or whatever on a form should not mean you don't have to validate any inputs as usual. You can setup the editor to only produce the code you expect and then run the required validations before submitting to the DB. Her is an old example of using it for a form textarea:

<script src="//cdn.tinymce.com/4/tinymce.min.js"></script>
    var editor_config = {
        path_absolute : "/",
        selector: "textarea",
        plugins: [
            "advlist autolink lists link image charmap print preview hr anchor pagebreak",
            "searchreplace wordcount visualblocks visualchars code fullscreen",
            "insertdatetime media nonbreaking save table contextmenu directionality",
            "emoticons template paste textcolor colorpicker textpattern"
        toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image media",
        relative_urls: false,
        file_browser_callback : function(field_name, url, type, win) {
            var x = window.innerWidth || document.documentElement.clientWidth || document.getElementsByTagName('body')[0].clientWidth;
            var y = window.innerHeight|| document.documentElement.clientHeight|| document.getElementsByTagName('body')[0].clientHeight;

            var cmsURL = editor_config.path_absolute + 'laravel-filemanager?field_name=' + field_name;
            if (type == 'image') {
                cmsURL = cmsURL + "&type=Images";
            } else {
                cmsURL = cmsURL + "&type=Files";

                file : cmsURL,
                title : 'Filemanager',
                width : x * 0.8,
                height : y * 0.8,
                resizable : "yes",
                close_previous : "no"


Hope that helps.

18th May, 2017

ejdelmonico left a reply on Vue Axios Refresh • 2 months ago

Whichever manner you choose just remember that this is not the vue instance when using setInterval or setTimeout so you will have to fix that before you call it. Also, check https://vuejs.org/v2/api/#vm-nextTick for $nextTick() or $forceUpdate()

17th May, 2017

ejdelmonico left a reply on Vue.JS - Material Components - Mix/Webpack • 2 months ago

Well, why use require() when ES2015 makes it unnecessary via the import rule. Have a look at this http://researchhubs.com/post/computing/javascript/nodejs-require-vs-es6-import-export.html

Also, there are other articles around that will give more details as to why most are moving away from require() except in some use cases.

16th May, 2017

ejdelmonico left a reply on Best Practices For Server Updates? • 2 months ago

I can tell you the way I handle all of my Forge/Envoyer servers. First, as you are probably aware, the servers will perform security updates and update composer. The rest is up to you. Usually once per month, I run sudo apt update && sudo apt upgrade. There are a few package upgrades that will ask to change your config files to update or keep the old files...KEEP THE OLD CONFIG! Otherwise, you will have to provision a new server and start over...tracing what config needs to be changed takes too long so just whip up a new one.

Performing that once a month should be fine. Personally, I have a project demo server that I try the updates on before doing so on the production boxes. If you want more detailed information, I wouldn't hesitate to check out <serversforhackers.com>[https://serversforhackers.com].

ejdelmonico left a reply on Vue.JS - Material Components - Mix/Webpack • 2 months ago

Have a look at this library and are you compiling material-components as a module? Also, I would stay away from require() unless you are not using ES2015 in which case you would use the import statement.

13th May, 2017

ejdelmonico left a reply on Many To Many Query • 2 months ago

I would investigate using a "local scope" on the model because it seems you will be using that query more than once. Something like:

    public function scopeFeatures($query)
        return $query->where('features', 1);

ejdelmonico left a reply on ReactJS With Laravel • 2 months ago

Personally, I would add it in the beginning if that is what you are planning. Yes, react can be included. However, you will need to customize your Webpack config if using Mix to work properly. Just remove the Vue references and setup react. The real difference is you will need to adapt your project structure from normal react apps so that it works well with Laravel...I suggest setting up laravel as an api to use with react components.

ejdelmonico left a reply on Homestead Up - Vagrant Error • 2 months ago

@wallyj Please format code submissions so we can read it. Use 3 backticks before and after the code blocks. Post your entire Homestead.yaml file and make sure you are using the latest Homestead and Vagrant.

26th April, 2017

ejdelmonico left a reply on Auth Middle Ware Error ERR_TOO_MANY_REDIRECTS • 3 months ago

@williamc1983 To add to what Snapey stated, once everything is cleared...the session cookie is gone so Chrome doesn't find the user already logged while you are trying to login again. Additionally, Firefox will do the same on occasion. If the issue occurs on a site you need to access and just can't because of the redirect loop, just try accessing a page that you know is guarded by credentials and it should avoid the endless redirect loop.

17th April, 2017

ejdelmonico left a reply on Mail Not Using From Adress • 3 months ago

Can you post the entire Contact mailable class? So far, I do not see an issue.

ejdelmonico left a reply on Mail Not Using From Adress • 3 months ago

Are you positive that $this->name is what you expect? The signature for the method is

     * Set the sender of the message.
     * @param  object|array|string  $address
     * @param  string|null  $name
     * @return $this
    public function from($address, $name = null)
        return $this->setAddress($address, $name, 'from');

ejdelmonico left a reply on Mail Not Using From Adress • 3 months ago

Mail has changed with each release of Laravel. How about telling us which version you are using (5.3, 5.4, 5.5)?

ejdelmonico left a reply on Incorrect Url In Compiled Css File • 3 months ago

Did you copy your fonts/ to the correct path in public/? If not, the processed css will not find the files.

ejdelmonico left a reply on Can't Make Spark Installation Work • 3 months ago

@mrad This could be caused by a number of problems. I haven't used Spark for about a year now but everything is close to as it was. The primary failures of Spark development installations are the Laravel and Spark installers being outdated as well as not running a newer version of Node. The reason being that Spark pulls in the current Laravel version and Cashier and then alters the appropriate files. In essence, there a lot of possible failure points during installation. When troubleshooting, check the low hanging fruit first like current installers and Node version.

Also, if using Homestead, I use "nfs" so that things are faster in the Spark project. Report back what you verified with versions on the install.

31st March, 2017

ejdelmonico left a reply on [SOLVED] Cloudflare Not Work With Laravel • 3 months ago

Taylor Otwell published an article detailing how to do it. Search Medium for it. Also, I have over 25 Laravel sites running on SSL with Cloudflare and it's very easy to set up correctly. Just check around for articles but start with Taylor's first.

ejdelmonico left a reply on Being DDoS Attacked And How To Prevent From It • 3 months ago

Hmm, I have never tried anything like that on Cloudflare. However, there has to be an article or two on similar type projects that you can reference. Cloudflare will definitely do the job if you can devise a solution to solve the waiting time. Maybe something like upload/download directly to/from S3 or something. I would tend to separate the video processing from my site to increase availability and stability.

Maybe you could write a quick note to Cloudflare support and ask. They are pretty good about responding.

ejdelmonico left a reply on Forge: Forge Script Able To Run Php Artisan Migrate:refresh? • 3 months ago

You can do a dump of the data and do a quick comparison to make sure it is correct before refreshing the DB. As you are aware, running that artisan command will wipe everything. What I have done in the past is freeze everything and make a DB copy to local and run the refresh and restore on the local copy. This way, I can check for any unforeseen issues before I wipe everything on production.

ejdelmonico left a reply on Being DDoS Attacked And How To Prevent From It • 3 months ago

I suggest that you use Cloudflare or a similar product. It's cheap and works very well. You will minimize the DDoS attacks and it is easy to configure.

ejdelmonico left a reply on Laravel-Mix (WebPack) Does Not Work On Linux When Deploying (work On Mac) • 3 months ago

@nanosolutions It would be advisable that you do some reading on modern workflows and how a repo is used in different scenarios. You, my friend, definitely do not understand the process of versioning and effective use of deploying from a repo.

30th March, 2017

ejdelmonico left a reply on How Do I Include NPM Installed JS Library E.g JQuery UI • 3 months ago

You should search a bit better. This answer should do it for you.


ejdelmonico left a reply on How To Configure Webpack And Drop Elixir/Gulp From My Project? • 3 months ago

There really isn't much to configure for a Laravel project that is not already done for you. In the github project, you will find some docs on usage. The rest is just understanding how Webpack works and what it is used for. You will find with experience that Webpack is very flexible and can be used in any situation.

ejdelmonico left a reply on Laravel-Mix (WebPack) Does Not Work On Linux When Deploying (work On Mac) • 3 months ago

As @zachleigh states, you are misunderstanding the deployment process and the basics of Webpack. With Webpack, everything is a dev dependency unless you are going to use it separately in production. Everything is bundled up and ready to use so those processed files are committed to the repo and deployed for production. You should not be installing any dev dependencies or running npm scripts on the production server.

28th March, 2017

ejdelmonico left a reply on JQuery Ui And App.js Conflict • 3 months ago

You need to provide some code and show how you are applying jquery-ui. Check my previous posts on including jquery-ui with webpack as well.

12th March, 2017

ejdelmonico left a reply on Bootstrap Classes Broke After Versioning With Laravel-elixir. • 4 months ago

Well, the only thing that stands out is you forgot quotes are the url for your import statement. Maybe that messed up the uglify process. Also, sometimes you have to scroll up to see warnings.

ejdelmonico left a reply on Mix All JS In Directory • 4 months ago

Look at the docs here

mix.combine(['one.js', 'two.js'], 'merged.js');

You should be able to use a wildcard as well like *.js

ejdelmonico left a reply on What Is The Right Way To Package All JS And CSS File Under One File In Laravel 5.4? • 4 months ago

My basic recommendation is to use ES6 import statement to bring in packages. The require() statement will eventually be the non standard way of including packages. If the package does not export, you will have to tell Webpack about it like I mentioned above. Usually, you will need to either declare a vendor package or use an alias.

11th March, 2017

ejdelmonico left a reply on Laravel Mix - How Exclude Vue.js • 4 months ago

Just remove the Vue require() statements in boostarp.js, the vue instance and vue from package.json.

ejdelmonico left a reply on What Is The Right Way To Package All JS And CSS File Under One File In Laravel 5.4? • 4 months ago

Definitely use Webpack. It takes a bit if work to understand the configurations but there is a plugin for everything and it is infinitely adaptable to whatever your current project needs. There are many tutorials on webpack. There are many videos on Laracasts and a great tutorial on Udemy called Webpack 2 by Stephen Grider (watch for sales on Udemy and you can get the course for $15).

9th March, 2017

ejdelmonico left a reply on Datepicker 4.15.35 With Bootstrap 4.0.0 • 4 months ago

@wirli Have you tried using ES6 import instead of processing through webpack config? Webpack will still process the import. However, I am not sure if the package you are using is exportable. Otherwise, there are plenty of webpack packages for datetime.

8th March, 2017

ejdelmonico left a reply on Laravel Mix And React Js • 4 months ago

Check your Babel processing. The spread operator requirements are probably missing or incomplete.

ejdelmonico left a reply on Elixir Webpack Official Not Npm Installing • 4 months ago

The error seems to indicate that you do not have git installed...or, it can't find it.

ejdelmonico left a reply on Elixir Webpack Official Not Npm Installing • 4 months ago

Try a global install first. Sometimes, it's the only way to get things to work with all of those packages. npm install -g laravel-elixir-webpack-official


npm install laravel-elixir-webpack-official --save-dev

That should give you 1.0.10

ejdelmonico left a reply on 'npm Install' Error On New Homestead VM • 4 months ago

For homestead, you run everything from the project directory and it will mirror to the vm. That is what the Homestead.yaml file is for. If you don't have artisan setup to run from your host machine, the you will need to ssh into the vm's project directory to run artisan migrate etc.

ejdelmonico started a new conversation Laracon Online Was Great! • 4 months ago

Laracon Online was excellent and more than worth the $15.00 ticket fee. I would recommend everyone who didn't see the presentations, to legally watch them when they are published!!

6th March, 2017

ejdelmonico left a reply on Laravel Mix Is Breaking A Feature Test? • 4 months ago

I was just wondering if something didn't install properly. Another thing I have done in past when having issues with a manifest file is to trash everything that npm run dev produces in the public directory and re-run it. So, that would be to remove the

  • css/
  • js/
  • fonts/
  • mix-manifest.json

It's worth a shot.

ejdelmonico left a reply on Security Updates • 4 months ago

I believe Forge updates the packages it installs. I wouldn't begin to believe that it installs all security packages. Could they possibly be from packages that you installed? The only reason I say this is because I see pending updates for my servers all the time but they are usually for packages I install AND security packages that are breaking...in other words install them but select the already installed config file or you might break something.

ejdelmonico left a reply on Laravel Mix Is Breaking A Feature Test? • 4 months ago

Do any of the ExampleTest files work ( Features/ExampleTest or Unit/ExampleTest)?

ejdelmonico left a reply on Laravel Mix Is Breaking A Feature Test? • 4 months ago

Hmm, that is really odd. Try clearing all caches through artisan. It's a crap shoot, but I have seen stranger things.

ejdelmonico left a reply on Laravel Mix Don't Write File In Production. • 4 months ago

First off, unless your EC2 instance can compile production files on the fly like Heroku, you need to commit your file to the repo. For instance, I commit the dev compiled files during development. When I am ready to go to production, I run the production flag and test. After it checks out, I commit to repo and deploy. You can do it that way, or use Envoy to make everything work for you in a script file.


ejdelmonico left a reply on Laravel Mix Is Breaking A Feature Test? • 4 months ago

Assuming that the test file is standard, are you using versioning? Also, make sure you upgrade to the latest Mix.

ejdelmonico left a reply on React Not Transpiling Under Larave-mix • 4 months ago

@ruru If this worked for you, please mark it correct so others can use it.

Edit Your Profile

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