mikebronner

Managing Partner at GeneaLabs, LLC

Hire Me

Experience

63,645

34 Best Reply Awards

  • Member Since 4 Years Ago
  • 468 Lessons Completed
  • 169 Favorites

17th August, 2017

mikebronner left a reply on Modules Vs Packages For Enterprise Information System • 1 year ago

I'm not the original poster, but wanted to share the route I have taken: packages all the way. It forces you to rethink functionality, and how it makes sense to develop it with re-usability in mind, which is a form or optimization and lowers technical debt.

If I know that something is not going to be planned to be reusable across projects, I will create it as part of the app domain without worrying about modularizing it. I can always extract it to a package in the future, should the need arise.

9th May, 2017

mikebronner started a new conversation How To "record" Complex JavaScript Actions With Dusk? • 1 year ago

I have multiple forms using selectize.js and was wondering how I can text selectize-enabled drop-downs using dusk? The challenge I am trying to overcome is figuring out how to test client-created javascript code and DOM nodes using Dusk.

2nd May, 2017

mikebronner left a reply on Cannot Modify Header Information. • 1 year ago

I'm coming up against the same issue when trying to run Dusk.

3rd March, 2017

mikebronner started a new conversation Is There A Way To Load Versioned Assets Using JavaScript? • 1 year ago

I'm using Laravel Mix to prepare my javascript and css assets with the cache-busting version() method at the end. This creates file names with random bits that are recorded in the mix-manifest.json file, which is used by the laravel helper mix() to load the appropriate asset.

I have a bit of a special situation in which I have to load my CSS file using JavaScript, and am wondering if there is a way to reference the CSS file?

    var head  = document.getElementsByTagName('head')[0];
    var link  = document.createElement('link');

    link.rel  = 'stylesheet';
    link.type = 'text/css';
    link.href = "{!! mix('/app.css', 'genealabs-laravel-casts') !!}"; // obviously this doesn't work => looking for a solution here
    link.media = 'all';
    head.insertBefore(link, head.firstChild);

Any ideas would be greatly appreciated. :)

14th December, 2016

mikebronner left a reply on FPDI Instantiation Results In 502 Bad Gateway • 1 year ago

I'm suspecting this might be the root of the problem: https://github.com/Setasign/FPDI/pull/12

mikebronner left a reply on FPDI Instantiation Results In 502 Bad Gateway • 1 year ago

Oh, yea ... I thought maybe you had a concrete indicator what was wrong. Yea, I rolled back to 7.0 and its working again. Was hoping for something specific we might be able to act on. :) I'll keep you posted if I find anything out.

mikebronner left a reply on FPDI Instantiation Results In 502 Bad Gateway • 1 year ago

Hmm, ok ... thanks ... have you found any issues opened against FPDI to indicate they are working on this? :)

mikebronner left a reply on FPDI Instantiation Results In 502 Bad Gateway • 1 year ago

But you still have the PHP7.1 issue, right?

mikebronner left a reply on FPDI Instantiation Results In 502 Bad Gateway • 1 year ago

What did you change? I tried dd() in the FPDF constructor (the base class) and it still errors, which makes me think it has to do with all the class_exists checking, etc., or some other ancillary non-PS4-adhering programming practices?

mikebronner left a reply on FPDI Instantiation Results In 502 Bad Gateway • 1 year ago

I'm getting this for the past few days as well. Are you on PHP 7.1 by any chance? I wonder if there are issues there.

1st December, 2016

mikebronner left a reply on CSRF Token Mismatch Error On Session Timeout / Form • 1 year ago

@mgmk That's awesome, great to hear you got it running. :)

30th November, 2016

26th November, 2016

mikebronner left a reply on How Can I Run Homestead With Parallels • 1 year ago

@bowersbros Thanks so much! I will give it a go when I get back home from Thanksgiving holidays.

20th November, 2016

mikebronner left a reply on How Can I Run Homestead With Parallels • 1 year ago

@bowersbros I was going to try this out (I use parallels for everything else and it would be awesome to just have one VM environment loaded). I noticed the image is still the old one. Do you have plans to update it and bring it current? Thanks!

9th November, 2016

mikebronner left a reply on How To Add Bcc To Mail Notifications • 1 year ago

@MalcolmKnott ,

I just found this: https://github.com/laravel/framework/issues/15694

Looks like you can combine Notifications and Mailables! :) That should do the trick. Working on implementing that now.

mikebronner left a reply on How To Add Bcc To Mail Notifications • 1 year ago

@MalcolmKnott have you found a solution? I'm looking for the same. :)

29th August, 2016

mikebronner left a reply on CSRF Token Mismatch Error On Session Timeout / Form • 1 year ago

@alexmansour There shouldn't be any security concerns introduced by the Laravel Caffeine package. The only gotcha is that it isn't meant for single page apps (SPAs), as already noted. Other than that, you should be good to go. Let me know how it goes. In the worst case, you can just remove the package and you will be back to normal. :)

28th August, 2016

mikebronner left a reply on CSRF Token Mismatch Error On Session Timeout / Form • 1 year ago

Hi @alexmansour,

The package is intended for use with standard (non-SPA) apps that make a request for page renders. It is not intended to work with SPAs -- I just wanted to clear that up before you get too deep into it.

You wont have to do anything special, it will do everything for you, all you need to do is install it, and it will keep the session alive via ajax calls to its own endpoint. This only happens on pages that actually have forms on them, as we want the session to expire on non-form pages, as per usual. (If you are trying to keep the session alive for all pages, simply increase the session lifetime in your config file.)

I hope this answers your questions somewhat? If not, don't hesitate to ask (and perhaps include a specific use-case to illustrate your point).

Let me know how it goes for you! Good luck :).

25th August, 2016

mikebronner left a reply on Elixir Output Both Standard And Minified Files? • 1 year ago

Have you found a solution to this? I'm trying to figure out the same thing. :)

18th June, 2016

mikebronner left a reply on Run After Middleware To Manipulate The Response Content? • 2 years ago

The problem with the middleware approach is that the view is rendered twice, causing some package to behave weirdly. Has anyone figured out a way to do this without rendering the view twice?

11th June, 2016

mikebronner started a new conversation Include Gulpfile From Packages In Main App Gulpfile? • 2 years ago

I'm trying to figure out the best approach to providing assets from packages to be browserified or concatenated into the main app's assets without requiring a lot of configuration. How have you guys solved this (from the view of writing an open source package, making it as easy as possible to integrate for your users)?

5th May, 2016

mikebronner left a reply on Spark + Vueify + Custom Vue Components • 2 years ago

Hmm, not sure .... from the error it appears that this.$http is not instantiated.

I didn't use vue-resource to post my form in the component I made, but it shouldn't be a problem. Do you have the app on a staging server we could look at? There must be some console errors or warnings?

mikebronner left a reply on Spark + Vueify + Custom Vue Components • 2 years ago

Hi @christophrumpel ,

I think this is because vue-resource is not available. Have you installed it and registered it globally with vue?

8th February, 2016

mikebronner left a reply on Submodules? • 2 years ago

thanks for clarifying

31st January, 2016

mikebronner left a reply on DigitalOcean Private Network Database Connection Timed Out • 2 years ago

Hi @colonalLoud

  1. Log into Forge.
  2. Select the server you want to update.
  3. Click the networking tab.

:)

mikebronner left a reply on [L5.2] Where To Put Package's Integration Tests? • 2 years ago

Hi Alariva,

I have adopted another option: create package as a submodule in a new app, that functions solely as the testing and development platform for the package.

This way the package development is not tied to a specific project, and maintainance can be performed any time without affecting other projects.

For example: Test/Development App: https://github.com/GeneaLabs/laravel-governor-tests Package: https://github.com/GeneaLabs/laravel-governor

I'm interested to see what you come up with, be sure to keep us updated. Hope this helps a bit. :)

12th December, 2015

mikebronner left a reply on BrowserSync Not Refreshing • 2 years ago

I stopped using browser synchs because of this. Would love to hear a solution. :) Haven't had the time to really dig into this issue.

8th December, 2015

mikebronner left a reply on Hi Can Anyone Help Me With Authy • 2 years ago

You could see how it is implemented in Laravel Spark: https://github.com/laravel/spark

1st December, 2015

mikebronner left a reply on Issues With Latest Release And Blade Templates • 2 years ago

Two things I would try:

  • Move the ending of the first section to its own line.
  • Instead of using @stop use @endsection

14th November, 2015

mikebronner started a new conversation SqLite "no Such Table" Error In Unit Tests With Migrations • 2 years ago

I have set up unit tests in Laravel 5.1 using sqLite ion-memory databases. I am getting the following error when running my tests:

PDOException: SQLSTATE[HY000]: General error: 1 no such table: versions

My unit test employ migration and transaction traits as per the Laravel documentation: http://laravel.com/docs/5.1/testing

The stack trace shows that this error occurs during the roll-back phase after each test is performed. I did a quick select statement to verify the table exists at the end of each test.

Any idea what is happening here?

Thanks!

13th November, 2015

mikebronner left a reply on How Do I Create Multiple Vue Instances On The Same .js File? • 2 years ago

What I have done thus far:

if ($('#step1').length > 0) {
new Vue({
  el: '#step1',
  data: {
    value1: '',
  }
});
}

if ($('step2').length > 0) {
new Vue({
  el: '#step2',
  data: {
    value2: '',
  }
});
}

12th November, 2015

mikebronner left a reply on Material Theme For Jetbrains • 2 years ago

I'm holding out for the light version :)

mikebronner left a reply on How To Print Something In Laravel Console • 2 years ago

Easiest way is through console commands, as described here: http://laravel.com/docs/5.1/artisan#writing-output I know my answer is a bit short on details, but the documentation there is so good, you should be easily up and running with its guidance :)

mikebronner left a reply on Laravel's Testing Not Working On File URLs • 2 years ago

Actually, creating the route and handling it in a controller was sufficient to properly process the unit test. Thanks @ohffs for the rubber-ducking! :)

mikebronner left a reply on Laravel's Testing Not Working On File URLs • 2 years ago

Unfortunately that makes the entire point of the integration tests here moot. :( I guess I could rig up a catch-all view that returns the file if it exists and a 404 if it doesn't. grummble :)

mikebronner started a new conversation Laravel's Testing Not Working On File URLs • 2 years ago

I am writing some tests that access files directly, for example favicon.ico or favicon-32x32.png. In the unit tests I get a NotFoundHttpException for accessing non-php files, but routed files seem to work fine. For example the welcome page loads without issue. The file exists and I have verified it by var_duming a file_exists() call in middleware.

Any ideas how to work around this?

Here's my test:

    /** @test */
    public function it_gets_200_response_if_apple_touch_icon_exists()
    {
        $response = $this->call('GET', '/favicon-32x32.png');
        $this->assertEquals(200, $response->getStatusCode());
    }

And my file is located in /public/favicon-32x32.png

10th November, 2015

mikebronner left a reply on Running Gulp --production During Deployment • 2 years ago

Yea, if you disable source maps its almost hopeless on a dev machine.

I see the biggest issue with building it during deploy is that you will get version discrepancies between what you tested, and what is deployed, if the server pulls a version other than you intended (as you explained was happening between developer machines as well).

To me there's a risk that can't be mitigated (unless NPM comes out with a lock file).

I, too, have a project that takes about 10 minutes to build because a library that is included (via require, not mix.scripts()) is about 175kb large. I have not found an optimal solution for this project yet, so I understand the concern. Oddly enough the way to make it faster was not to browserify(), but use scripts() on that large library.

9th November, 2015

mikebronner left a reply on View Not Found Error When Sending Email From Console Command • 2 years ago

OK, thanks to a second pair of eyes from friend @artisangoose: he pointed out to me that the periods will all be interpreted as slashes in the full path, so I cannot use periods in the file name itself. Renaming the two files to

  • /resources/views/emails/html-notification.blade.php
  • /resources/views/emails/text-notification.blade.php

resolved the issue. Hopefully this helps another poor soul down the road that gets stuck on this "derpy" problem. ;-P

mikebronner started a new conversation View Not Found Error When Sending Email From Console Command • 2 years ago

I'm trying to send emails from a console command like so:

    private function sendEmailTo($subscribersToBeNotified)
    {
        Mail::send(['emails.html.notification', 'emails.text.notification'], [], function ($mail) use ($subscribersToBeNotified) {
            $mail->from('My Awesome App', 'hello@mycompany.com');
            $mail->bcc($subscribersToBeNotified);
            $mail->subject('What do you know?');
        });
    }

I get the following error when running the command in terminal:

[InvalidArgumentException]                  
View [emails.html.notification] not found.

My view files are at:

  • /resources/views/emails/html.notification.blade.php
  • /resources/views/emails/text.notification.blade.php

First I was thinking its something obvious like a spelling error, but I've triple checked everything I can think of. (I'm using the log driver to test the emails, but that shouldn't affect it.)

Any ideas?

8th November, 2015

mikebronner left a reply on Redirect After Session Expired • 2 years ago

@usman Thanks for the props :)

6th November, 2015

mikebronner left a reply on DigitalOcean Private Network Database Connection Timed Out • 2 years ago

Oh my lord .... I'm having a bad day.... so easy. Forge > Server > Networking > connect to target server.

mikebronner left a reply on DigitalOcean Private Network Database Connection Timed Out • 2 years ago

bind-address = * as per Forge's default settings. But you're right ... it might only be allowing remote access through SSH (which really is local access via a tunnel). I think that's a Forge setting, for security purposes, right? Is there a way to configure it to allow non-ssh access from a specific IP address (the private network IP would be the one I would want to use there).

mikebronner started a new conversation DigitalOcean Private Network Database Connection Timed Out • 2 years ago

Hi all,

I am attempting to connect from one droplet to the the database of another. I put the private IP address of the droplet with the database in DB_HOST env parameter, but I get the following error when trying to connect:

[PDOException]
SQLSTATE[HY000] [2002] Connection timed out

This tells me that at least the connection to the mysql server is being made (otherwise I would get an access denied error or something).

Any ideas what the fix might be?

Thanks! ~Mike

29th October, 2015

mikebronner left a reply on Functions Defined In App.js Not Accessible From Page?! • 2 years ago

Oh ... never mind -- I switched to the awesomeness that is VueJS. And magically all my problems went away. :) hehe

mikebronner started a new conversation Functions Defined In App.js Not Accessible From Page?! • 2 years ago

I think I must be having a brain-fart at the moment ...

I have defined a function in /resources/assets/js/app.js, which is processed by elixir's mix.browserify():

    mix.sass('app.scss')
        .browserify('app.js');
function myFunction($var)
{
console.log('test');
}

When I try to call that function from the front-end, I get the following error:

<input type="text" onkeyup="myFunction($(this).val());" class="form-control">
ReferenceError: Can't find variable: myFunc

Further, when trying to call the function in the console command-line, it won't find it either. Any ideas what's happening here?

25th October, 2015

mikebronner left a reply on Javascript Problems After Uploading To Server • 2 years ago

Check the Inspector pane and Console pane in your browser to make sure the include URL for tinymce is correct. Chances are it's not loading -- verify the URL by copy/pasting it into a new browser window or tab.

mikebronner left a reply on Class 'App\Commands\Command' Not Found • 2 years ago

Instead use artisan make:job -- command generator is deprecated from L5.0 I believe.

21st October, 2015

mikebronner left a reply on Raw Query But Map To My Model?? • 2 years ago

Why not get it through the relationships, something like this perhaps:

$client = $this->user->client;
$client->load('inventories'); // if not already loaded
$maxInventoryDate = DB::table('inventories')->where('client_id', $client->id)->max('created_at');
$inventories = client->inventories->where('created_at', $maxInventoryDate)->get();

There probably is a better way to structure it so that there is only one query, i.e. through a join, but I think this might at least get you on the right track? Let us know how it goes. :)

17th October, 2015

mikebronner left a reply on Vue Model Binding To Object Property? • 2 years ago

Thanks @bestmomo ! That was perfect :)

mikebronner started a new conversation Vue Model Binding To Object Property? • 2 years ago

I have an object in the Vue data section, and would like to use v-model on one of its properties. Unfortunately it doesn't seem to update dynamically. Any suggestions?

This is the relevant portion of the Vue app:

    data: {
        tests: {}
    },

    ready: function () {
            for (var counter=0; counter < 10; counter++) {
                this.tests[counter]] = [];
            }
            this.tests[5] = 'test';
    }

Then in my view:

                                    <div v-repeat="test: tests[5]">
                                        @{{ test }}
                                    </div>
Edit Your Profile
Update

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