twg_

Freelance Web Developer at ThatWebGuy

Member Since 4 Years Ago

Experience Points
25,560
Total
Experience

4,440 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
185
Lessons
Completed
Best Reply Awards
0
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.

Level 6
25,560 XP
Nov
20
3 weeks ago
Activity icon

Started a new Conversation Data Encryption

I'm create a small sass application and I want to encrypt the end users data and then decrypt it when they login to view it. I found an article that had a plugin for Laravel that would do it. It was based on the user's hashed password.

I'm trying to create a way because my app will have different tiers which include how many logins are allowed on each one. I need any logins associated with main account to be able to decrypt the data.

Any suggestions on what I should be looking into?

Nov
07
1 month ago
Activity icon

Started a new Conversation Symphony Process

I'm trying to run a terminal command using Symfony Processes but can't seem to get phantomjs to run. I've checked the user the command is running as and it's the same as when I actually run it from my terminal window. I can run the same version from my terminal and it runs just fine.

Oct
26
1 month ago
Activity icon

Started a new Conversation Regression Testing With Laravel

I've seen articles where I can test for regression inside my Laravel app but I'm trying to build a small app for internal use that will allow me to test for changes on many sites that I own. I have 130+ editors that I need to watch to see changes to their site to see if it correlates with any drop in their views.

I found a plugin called Laravel Visual Diff by BeyondCode but it hasn't been updated in a year and does not work with Laravel 6.4.

Has anyone else come across a plugin or created something similar?

Oct
04
2 months ago
Activity icon

Started a new Conversation Add Task To Mix To Call API

I'm currently using Laravel Mix to build my site css & js. After I build it I have to either upload it to my dev or prod site depending on what I'm doing.

Is there a way that I could call an API to upload the new JS & CSS to the correct instance so I can cut out a manual step?

Sep
26
2 months ago
Activity icon

Replied to Convert Gulp Task To Webpack

Yeah I'm wanting to recreate this gulp task in webpack.

gulp.task('prefix', function(done) {
    var prefix = gutil.env.p || gutil.env.prefix || false;

    if(!prefix) {
        return done();
    }

    gutil.log("Replacing prefix 'uk' with '"+prefix+"'");

    gulp.src(['./dist/**/*.css', './dist/**/*.less', './dist/**/*.scss', './dist/**/*.js'])
        .pipe(replace(/(uk-([a-z\d\-]+))/g, prefix+'-'))
        .pipe(replace(/data-uk-/g, 'data-'+prefix+'-'))
        .pipe(replace(/UIkit2/g, 'UIkit2'+prefix))
        .pipe(gulp.dest('./dist'))
        .on('end', done);
});
Sep
25
2 months ago
Activity icon

Started a new Conversation Convert Gulp Task To Webpack

Hi,

I'm not sure if this is possible or not but I was wondering if there is a way to go through a file(s) replace a prefix in SCSS & JS. I've seen it done in UIKit v2 but it's in gulp.

Sep
09
3 months ago
Activity icon

Started a new Conversation Updating Database On JQuery.ajax Call

Hi,

I have implemented drag-n-drop order of some items but I'm trying to figure out how to implement the model update.

Here is an example of the data I'm posting:

[
    'pages' => [
        { id: "10", children: [] },
        { id: "15", children: [] },
        { id: "2", children: [
            { id: "4" },
            { id: "5" }
        ]},
        { id: "8", children: [] }
    ]
]

In my controller I'm checking to make sure that $request->has('pages') but after that I'm not 100% sure how to loop through the id's and update their appropriate data entry with the order they are in and then how to update the children items the same with but with also the parent id that it's inside.

Sep
07
3 months ago
Activity icon

Started a new Conversation Drag-n-drop Sorting With Child Elements

Hi,

I have a basic drap-n-drop working without any children and when it's moved, the database is updated. I'm having an issue figuring out how to update the database when a element is dragged as a child.

Has anyone done this before with Laravel & jQuery Sortable.

Aug
27
3 months ago
Activity icon

Started a new Conversation Mix Specific Files Based On Flag

I was wondering if I could use a single webpack.mix.js file to mix all of my files for each sub section of my website. I have all fo the files living inside a global project but I would like to only mix certain ones when I need to without having to wait for them all to mix each time.

Jul
11
5 months ago
Activity icon

Replied to Drag And Drop Sorting

Hi @hollyit @mstrauss ,

I implemented the page_ in the id and the console.log is working now. This will be pretty small reordering of pages so I don't think I will run into a UX nightmare. I've never used a debounce function. Can you share any more on that?

Activity icon

Replied to Drag And Drop Sorting

That still doesn't output anything to the console.

Activity icon

Replied to Drag And Drop Sorting

@mstrauss The output is blank. It doesn't return NULL or EMPTY or anything.

Activity icon

Replied to Drag And Drop Sorting

I forgot to add when I look at the dd in the networking tab and response. I get an array of array:1 [ 2 => null ]

Activity icon

Started a new Conversation Drag And Drop Sorting

I have setup sortable with jQuery UI and I'm able to drag and drop the items in any order I want. What I'm having issues with is saving the order after I move each item.

web.php

Route::prefix('manage')->group(function () {
    Route::prefix('pages')->group(function () {
        Route::post('/reposition', '[email protected]');
    });
});

[email protected]

public function submit(Request $request)
{
        dd($request->all());

        if ($request->has('item')) {
            $i = 0;

            foreach ($request->get('item') as $id) {
                print_r($id); die();
                $i++;
                $page = \App\Page::find($id);
                $page->menu_order = $i;
                $page->save();
            }

            return response()->json(array('success' => true));
        } else {
            return response()->json(array('success' => false));
        }
 }

Blade File (index.blade.php)

<div id="pages">
@foreach($pages as $page)
<div class="page" id="{{ $page->id }}">
    <div class="handle"></div>
    <div class="page-details">
        DETAILS HERE
    </div>
</div>
@endforeach
</div>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css">
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
<script type="text/javascript">
    $('#pages').sortable({
        'containment': 'parent',
        'revert': true,
        helper: function(e, div) {
            var $originals = div.children();
            var $helper = div.clone();
            $helper.children().each(function(index) {
                $(this).width($originals.eq(index).width());
            });
            return $helper;
        },
        handle: '.handle',
        update: function(event, ui) {
            var url = '{{ route("pages.reposition", ":id") }}';
            url = url.replace(':id', ui.item.attr('id'));
            $.post(
                url,
                $(this).sortable('serialize'),
                function(data) {
                    if (!data.success) {
                        alert('Whoops, something went wrong.');
                    }
                },
                'json'
            );
        }
    });
</script>
Jul
02
5 months ago
Activity icon

Replied to Mail Delivery Issues

I had the person working on it throw a try/catch on it and we got it resolved. Thanks.

Activity icon

Started a new Conversation Mail Delivery Issues

We are having some issues with mail delivery working. When we or a use submits a form, sometimes we get a time with no message, sometimes we get a timeout with a message and then other times the messages sends just fine.

We are connecting to an enterprise exchange server over smtp on port 25.

Has anyone else experienced this before?

Jun
30
5 months ago
Activity icon

Replied to Laravel + Vue SPA With Authentication

Thanks for that @bobbybouwmann. I actually came across the first link you sent about 30 minutes ago and I've been working through it. I'm trying to figure out my error 500 on my login post as we speak.

Jun
29
5 months ago
Activity icon

Started a new Conversation Laravel + Vue SPA With Authentication

Hi Everyone,

I'm starting to learn Vue and I'm playing around with trying to create a simple playground project. I'm trying to create a login system with roles/permissions using Vue & Laravel. Does anyone have any suggestions for tutorials?

Jun
26
5 months ago
Activity icon

Replied to Vuex Store

Thanks @ejdelmonico I actually moved over to Vuex to accomplish what I wanted which is working great now.

Activity icon

Started a new Conversation Vuex Store

I've built out a few templates with vue and I've figured out how to set a store value for SET_LAYOUT initially. I can't quite seem to figure out how I can change that value on a per page basis.

Has anyone done this before?

Jun
25
5 months ago
Activity icon

Replied to Autopublishing Laravel App With .env

Awesome. That's what I was doing but wanted to make sure there wasn't something I was missing. Thanks @aurawindsurfing.

Nice IT Crowd avatar. I was just watching an episode.

Activity icon

Started a new Conversation Autopublishing Laravel App With .env

Hi,

I'm using forge to push out my first project. When I push to my repo of course the .env file is left out since it's my production .env file. What's the best way to push changes and have a production env file?

Activity icon

Started a new Conversation Toggle Navigation On Page Load/change

So I've got my mobile navigation toggling open and close. The only issue I have left is how to close the navigation when the next page is loaded.

<script>
    let app = new Vue({
        el: '#app',
        data: {
            open: false
        },
        methods: {
            mobileNavToggle () {
                this.open = !this.open
            }
        }
    })
</script>