mikebronner

mikebronner

Managing Partner at GeneaLabs, LLC

Los Angeles, California, USA

Hire Me

Member Since 4 Years Ago

Experience Points 65,715
Experience
Level
Lessons Completed 484
Lessons
Completed
Best Reply Awards 34
Best Answer
Awards
  • Start Your Engines Achievement

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • First Thousand Achievement

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • One Year Member Achievement

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • Two Year Member Achievement

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • Three Year Member Achievement

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • Four Year Member Achievement

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • Five Year Member Achievement

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • School In Session Achievement

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • Welcome To The Community Achievement

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • Full Time Learner Achievement

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • Pay It Forward Achievement

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • Subscriber Achievement

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • Lifer Achievement

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • Laracasts Evangelist Achievement

    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 Achievement

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • Laracasts Veteran Achievement

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • Ten Thousand Strong Achievement

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • Laracasts Master Achievement

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • Laracasts Tutor Achievement

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • Laracasts Sensei Achievement

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • Top 50 Achievement

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

06 Dec
5 days ago

mikebronner left a reply on How To Display Laravel Nova Save Success Message?

I was able to figure it out:

                Nova.request()
                    .put("/my/nova/route/" + this.parameter, data)
                    .then(function (response) {
                        self.$toasted.show("Yay, it worked!", {type: "success"});
                    })
                    .catch(function (error) {
                        self.$toasted.show(error.response, {type: "error"});
                    });

mikebronner started a new conversation How To Display Laravel Nova Save Success Message?

Using the following, it is easy to show an error message in Nova in Vue:

Nova.$emit('error', error.response);

However, using the anticipated success option doesn't do anything:

Nova.$emit('success', "Yay, it worked!");

What is the right way to do this? I'm looking to show that a save was successful. Thanks!

                Nova.request()
                    .put("/my/nova/route/" + this.parameter, data)
                    .then(function (response) {
                        Nova.$emit("success", "Yay, it worked!");
                    })
                    .catch(function (error) {
                        Nova.$emit('error', error.response);
                    });
23 Aug
3 months ago

mikebronner left a reply on Cashier: Create Subscription With Quantity

This doesn't seem to work for me. I get the following error:

Call to undefined method Laravel\Cashier\SubscriptionBuilder::quantity()
17 Aug
1 year ago

mikebronner left a reply on Modules Vs Packages For Enterprise Information System

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.

09 May
1 year ago

mikebronner started a new conversation How To "record" Complex JavaScript Actions With Dusk?

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.

02 May
1 year ago

mikebronner left a reply on Cannot Modify Header Information.

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

03 Mar
1 year ago

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

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. :)

14 Dec
1 year ago

mikebronner left a reply on FPDI Instantiation Results In 502 Bad Gateway

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

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

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

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

mikebronner left a reply on FPDI Instantiation Results In 502 Bad Gateway

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

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.

01 Dec
2 years ago

mikebronner left a reply on CSRF Token Mismatch Error On Session Timeout / Form

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

26 Nov
2 years ago

mikebronner left a reply on How Can I Run Homestead With Parallels

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

20 Nov
2 years ago

mikebronner left a reply on How Can I Run Homestead With Parallels

@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!

09 Nov
2 years ago

mikebronner left a reply on How To Add Bcc To Mail Notifications

@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

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

29 Aug
2 years ago

mikebronner left a reply on CSRF Token Mismatch Error On Session Timeout / Form

@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. :)

28 Aug
2 years ago

mikebronner left a reply on CSRF Token Mismatch Error On Session Timeout / Form

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 :).

25 Aug
2 years ago

mikebronner left a reply on Elixir Output Both Standard And Minified Files?

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

18 Jun
2 years ago

mikebronner left a reply on Run After Middleware To Manipulate The Response Content?

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?

11 Jun
2 years ago

mikebronner started a new conversation Include Gulpfile From Packages In Main App Gulpfile?

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)?

05 May
2 years ago

mikebronner left a reply on Spark + Vueify + Custom Vue Components

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

Hi @christophrumpel ,

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

08 Feb
2 years ago

mikebronner left a reply on Submodules?

thanks for clarifying

31 Jan
2 years ago

mikebronner left a reply on DigitalOcean Private Network Database Connection Timed Out

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?

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. :)

12 Dec
2 years ago

mikebronner left a reply on BrowserSync Not Refreshing

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.

08 Dec
3 years ago

mikebronner left a reply on Hi Can Anyone Help Me With Authy

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

01 Dec
3 years ago

mikebronner left a reply on Issues With Latest Release And Blade Templates

Two things I would try:

  • Move the ending of the first section to its own line.
  • Instead of using @stop use @endsection
14 Nov
3 years ago

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

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!

13 Nov
3 years ago

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

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: '',
  }
});
}
12 Nov
3 years ago

mikebronner left a reply on Material Theme For Jetbrains

I'm holding out for the light version :)

mikebronner left a reply on How To Print Something In Laravel Console

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

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

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

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

10 Nov
3 years ago

mikebronner left a reply on Running Gulp --production During Deployment

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.

09 Nov
3 years ago

mikebronner left a reply on View Not Found Error When Sending Email From Console Command

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

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?

08 Nov
3 years ago

mikebronner left a reply on Redirect After Session Expired

@usman Thanks for the props :)

06 Nov
3 years ago

mikebronner left a reply on DigitalOcean Private Network Database Connection Timed Out

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

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

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

29 Oct
3 years ago

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

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?!

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?

25 Oct
3 years ago

mikebronner left a reply on Javascript Problems After Uploading To Server

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

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