connecteev

connecteev

Member Since 4 Years Ago

Experience Points 6,420
Experience Level 2

3,580 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 69
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.

11 Jul
1 week ago

connecteev left a reply on HTML Custom Sign Up Form (password) Validation

Subbed to his Youtube. Thanks @mstrauss...but I would appreciate some tips on this sweet signup form if anyone has some.

connecteev started a new conversation HTML Custom Sign Up Form (password) Validation

I have no idea where to start here, but I am trying to recreate the HTML form signup / password validation as seen here: https://duefocus.com/sign-up/

I love the UI of the red arrows turning into green checkmarks as the password meets the validation requirements. If someone can help point me to some sample code, that would be SO appreciated!

04 Jul
2 weeks ago

connecteev left a reply on Do You Like IViewUI

I love the UI and framework, hate that it's in chinese, and how difficult it is to get started. Once you get over the initial hump it's great

03 Jul
2 weeks ago

connecteev started a new conversation Making Imported Components Accessible Throughout My Laravel App

I have a hybrid app with Laravel and vue.js (as against a pure vue SPA talking to APIs in Laravel).

Now, vue.js has slots so that the parent component can pass data to a child component, and the child component can display the data as it pleases. But that "design pattern" doesnt work, does it? What if I have a header blade file or html file, and it is not a subcomponent. I want to show slot data there. Is that possible to do?

In this gist: https://gist.github.com/connecteev/b8fa305e0364cd28bca772b7149ad340 I'm trying to trigger the drawer from within the header...basically make the components imported from the vue library from anywhere in my Laravel app (I am also open to new ways of structuring the code...I have a burning sense that I'm not doing it right).

Thank you for your comments.

30 Jun
2 weeks ago

connecteev left a reply on Webpack /Laravel Mix Scopes Get Messed Up - How To Fix?

@bobbybouwmann As they say...you sir, are a gentleman and a scholar :)

connecteev left a reply on Webpack /Laravel Mix Scopes Get Messed Up - How To Fix?

Thank you @bobbybouwmann Btw I see you on all the laracasts forum threads and on twitter...you're always helping other people out. May I ask what's your motivation for spending so much of your time helping others? Surely it's not just for the karma points :) Anyway thank you!

29 Jun
2 weeks ago

connecteev started a new conversation Webpack /Laravel Mix Scopes Get Messed Up - How To Fix?

I have a NEW app with laravel and vue that I'm trying to get working. Thing is, webpack (laravel mix) messes up the scope in the resulting compiled app.js file.

app.js:

require('./bootstrap');

window.Vue = require('vue');

Vue.component('example-component', require('./components/ExampleComponent.vue').default);

const app = new Vue({
    el: '#app',
    mounted: function() {
        console.log('mounted');
    },
    methods: {
        show() {
        console.log('show');
        }
    }
});

app.show();

My welcome.blade.php file:


<!DOCTYPE html>
<html>
    <head>
        <title>Laravel</title>
    </head>
    <body>
        <div>
            <div id="app" class="content">
                <div>
                    Laravel
                </div>
            </div>
        </div>

<script src="/js/app.js"></script>
<script type="text/javascript">
    app.show();
</script>
    </body>
</html>

Calling app.show(); from the bottom of app.js file works (and I see "mounted" and "show" in the console logs), but app.show(); from the blade file results in an error in console:

Uncaught TypeError: app.show is not a function
    at (index):87

Note that using window.app.show(); in the blade file works fine.

How do I fix the webpack / laravel mix default config so that the variable scopes don't get messed up?

16 Jun
1 month ago

connecteev left a reply on Laravel Package Recommendations For Social Login + Auth + Double Opt-in + Email Verification

@nakov I have looked at Socialite, thanks. I am looking for tips on the rest of the functionality (2, 3, 4) as well. Open to that being built on top of Socialite or a new package entirely.

connecteev started a new conversation Laravel Package Recommendations For Social Login + Auth + Double Opt-in + Email Verification

Do you have any recommendations for Laravel package specifically for the following? I am trying to speed up development and not reinvent the wheel,

I need functionality for Login + Social Login + Auth (other than the php artisan make:auth default), so that I can:

  1. allow people to register and log in via either: email+password, Linkedin, Google or Facebook (account creation with email+password being the only one requiring an email confirmation / double opt-in)
  2. alternatively, allow people to do a "quick subscribe" to the blog by entering their email -> confirm their email via double opt-in. Then when they click the "confirmation" link in the email, they get redirected to the site and are asked to enter a password + confirm password to create an account.
  3. forgot password flow (comes packaged for free with make:auth)
  4. force a persistent top/bottom bar to show up so people are required to verify their email within 3 days (or auto-deactivate their accounts)
  5. bonus: indicate which login/social login method they used previously to log in (perhaps store in local storage and display a pointer in the UI..haven't seen this anywhere yet)

connecteev left a reply on Configuring Postcss-uncss For Laravel Mix

Ended up not going with uncss, but purgecss as a postcss plugin.

Might help another person in need:

let mix = require('laravel-mix');

const tailwindcss = require('tailwindcss');

// Removes unused CSS
// According to Discord chat: Running Purge CSS as part of Post CSS is a ton faster than laravel-mix-purgecss
// But if that doesn't work use https://github.com/spatie/laravel-mix-purgecss
const purgecss = require('@fullhuman/postcss-purgecss')({
  // Specify the paths to all of the template files in your project 
  content: [
    './resources/views/*.php',
    './resources/views/**/*.php',
    './resources/js/components/*.vue',
    './resources/js/components/**/*.vue',
  ],

  // Include any special characters you're using in this regular expression
  defaultExtractor: content => content.match(/[A-Za-z0-9-_:/]+/g) || []
});


/*
 |--------------------------------------------------------------------------
 | Mix Asset Management
 |--------------------------------------------------------------------------
 |
 | Mix provides a clean, fluent API for defining some Webpack build steps
 | for your Laravel application. By default, we are compiling the Sass
 | file for the application as well as bundling up all the JS files.
 |
 */
mix.options({
    clearConsole: true, // in watch mode, clears console after every build
});

mix.options({
        processCssUrls: false,
        postCss: [
            // to enable purgecss on production only
            //...process.env.NODE_ENV === 'production' ? [purgecss] : []
            purgecss
        ],
    })

12 Jun
1 month ago

connecteev started a new conversation Configuring Postcss-uncss For Laravel Mix

I am trying to remove unused css rules from one sass file.

Research led me to postcss-uncss as the best option for removing unused css if you do not use server-side rendering (see: https://www.purgecss.com/comparison)

https://github.com/uncss/postcss-uncss

Now, postcss-uncss is a wrapper for uncss: https://github.com/uncss/uncss However, the uncss documentation is confusing to me, and the example configuration here is not useful: https://github.com/uncss/postcss-uncss#example-configuration

How does one configure postcss-uncss for Laravel Mix?

THis is what I have so far:

mix.js('resources/js/app.js', 'public/js')
    .options({
        processCssUrls: false,
        postCss: [
            require('postcss-uncss'),
            tailwindcss('./tailwind.config.js')
        ],
    })

I want to:

  1. Tell it which laravel routes to use (or 'all' should also be fine)
  2. Where my sass / scss files are located: /resources/sass/* (example files: /resources/sass/app.scss, /resources/sass/admin/admin.scss, etc)
  3. Where to put the output ie the compiled (and cleaned up) css without the unused rules: /public/css/* (so as to preserve the same structure, for example: /public/app.css, /public/admin/admin.css, etc)

Thoughts would be greatly appreciated.

31 May
1 month ago

connecteev left a reply on Issue Installing Mailgun\Bogardo Package With Composer In Laravel

@bobbybouwmann @mvd @gabotronix

I'm facing the same problem and @bobbybouwmann 's solution doesn't quite work. After a fresh Laravel installation:

OneStepAtATime:bogardo_mailgun_emails$ composer require bogardo/mailgun
Using version ^5.0 for bogardo/mailgun
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested package nesbot/carbon (locked at 2.19.0, required as ^1.36) is satisfiable by nesbot/carbon[2.19.0] but these conflict with your requirements or minimum-stability.

  1. can one replicate the bogardo/mailgun package and resolve the dependency without getting too deep into package development?
  2. Possible to use "branch-alias" in the main Laravel (not the package's) composer.json file? https://blog.nikolaposa.in.rs/2015/09/06/composer-tips/ I didnt have much luck so not sure how to proceed.
17 May
2 months ago

connecteev left a reply on How Do You Install A Vue.js Package Into Laravel?

@robstar @dunsti @mthomas Thank you all. I got this to finally work. I need to add the import to my app.scss file, and also reference app.js and app.css in my welcome.blade.php file.

Appreciate ya'll jumping in to help.

16 May
2 months ago

connecteev left a reply on How Do You Install A Vue.js Package Into Laravel?

@YITZCHOK - @yitzchok I dont think the import is the problem. However, adding ~ to the import doesnt help either:

Failed to load resource: the server responded with a status of 404 (Not Found) common.css:1 

connecteev left a reply on How Do You Install A Vue.js Package Into Laravel?

@mthomas @robstar

I still haven't been able to get this to work. By the way, I did watch the 'component-related' videos at https://laracasts.com/series/learn-vue-2-step-by-step

Here is my public repo with the 2 commits of what I have tried: https://gitlab.com/connecteev/laravel_vodal_test

I ran this in Terminal 1: npm i -S vodal npm install npm run watch

I ran this in Terminal 2: php artisan serve This started serving at http://127.0.0.1:8000/ Then opened up a browser to go to http://127.0.0.1:8000/

Attempt 1: https://gitlab.com/connecteev/laravel_vodal_test/commit/d906e3c01e16dc74b8e5347808de90c1d2ef2639

This didnt work, and I then tried what I found here (for Attempt #2 below) https://vuejs.org/v2/guide/components-registration.html

Attempt 2: https://gitlab.com/connecteev/laravel_vodal_test/commit/7ee55b7d218d021729047a11ee229a3e3ce81460

No luck. All I see is https://prnt.sc/npion4

What am I missing?

connecteev left a reply on How Do You Install A Vue.js Package Into Laravel?

@ROBSTAR - @mthomas @robstar I did read the README at https://github.com/chenjiahan/vodal

What I don't understand is, which files need to be changed? Where does each of these go?

<vodal :show="show" animation="rotate" @hide="show = false">
    <div>A vue modal with animations.</div>
</vodal>
import Vue from 'vue';
import Vodal from 'vodal';

Vue.component(Vodal.name, Vodal);

export default {
  name: 'app',
    
  data() {
    return {
      show: false
    }
  }
}
// include animation styles
@import "vodal/common.css";
@import "vodal/rotate.css";

I tried different permutations, but never got a single one to work. I ended up frustrated and hence the question.

14 May
2 months ago

connecteev left a reply on How Do You Install A Vue.js Package Into Laravel?

@martinbean @mhdmada Not sure if you tried this, but none of these solutions worked

13 May
2 months ago

connecteev left a reply on How Do You Install A Vue.js Package Into Laravel?

@PROGRAMMER111 - vue's already installed with Laravel. I'm trying to install a vue package.

connecteev started a new conversation How Do You Install A Vue.js Package Into Laravel?

Specifically, I am looking to include https://github.com/chenjiahan/vodal into my Laravel app. The instructions in the https://github.com/chenjiahan/vodal package aren't very useful.

Is there a guide for this, somewhere? I need to know what files to change to get this to work.

06 May
2 months ago

connecteev left a reply on Envoy For Local Build Script?

Thanks!

Turns out the answer is that you have to use the blade syntax, like {{ $dir }}

connecteev left a reply on Envoy For Local Build Script?

Thanks @bobbybouwmann

  1. your suggestion for the echo on my local Macbook worked: echo /Users/kp/Code/_tmpbuilds/build_ {{ date('YmdHis') }}

Just is a bit strange because it worked fine (on a remote server) with echo "/Users/kp/Code/_tmpbuilds/build_" . date('YmdHis'); I guess different OS?

  1. Focusing on running this on my local Mac again, How do I set variables? My point with @ setup was that the variables set there are not visible within the @ task
@setup
    $dir = "/Users/kunalpunjabi/Code/_tmpbuilds/build_" . date('YmdHis')
@endsetup

@story('local')
    clone_repository
@endstory

@task('clone_repository')
    echo "mydir:" $dir
    echo "-- Done --"
@endtask

THis outputs:

$ envoy run local
[localhost]: mydir:
[localhost]: -- Done --

connecteev started a new conversation Envoy For Local Build Script?

Can Envoy be used for a local build script instead of a remote server deploy script? ANy examples? I haven't been able to get this to work for some reason or another....variables dont get recognized, and @setup never gets called.


@servers(['web' => 'localhost'])

@setup
    $dir = "/Users/kp/Code/_tmpbuilds/build_" . date('YmdHis')
@endsetup

@story('local')
    clone_repository
@endstory

@task('clone_repository')
    echo "/Users/kp/Code/_tmpbuilds/build_" . date('YmdHis');

    echo "-- Done --"
@endtask

connecteev left a reply on Need Laravel + Vue.js Code (or Packages) For Onboarding New Users

Thanks for the reply. I am not expecting this whole thing to be readily available, but I was hoping for a few of the pieces to be. For example, #1, #2 and #3 dont seem THAT far-fetched imo to be a package. Would you agree?

05 May
2 months ago

connecteev started a new conversation Need Laravel + Vue.js Code (or Packages) For Onboarding New Users

I am looking for code (ideally 1-2 packages that work well together) that Onboards new users. The onboarding flow will likely be used to get the user to fill out a profile (the flow needs to be broken into multiple steps / questions).

My requirements:

1. The first time the user creates an account or logs in, they are taken to step 1 of the onboarding flow. The user CANNOT get to the core application (which they want to do) until they complete the onboarding flow.

2. Let's say the onboarding flow has 5 steps. If the user fills out steps 1, 2, the data gets saved  (via Ajax calls). If the user then abandons at step 3, the data persists in the database. The next time the user comes to the app and logs in, they are taken to step 3, and have to fill out steps 3, 4, 5 before the onboarding flow is done and the user is allowed to access the app.

3. Technical requirements:
The back-end needs to be in Laravel.
The front-end of the flow needs to be very quick to load, ideally a Single-page-application written in Vue.js (maybe using other libraries like Vuetify). Ideally, the front-end makes API calls to the back-end (ie there is good code separation between the front-end and the back-end)

4. (Nice to have, definitely not required) A "Lazy" onboarding flow: An option to customize the onboarding flow for users that are NOT logged in. At each step of the flow, the data gets stored in local storage, and only after they finish step 5 of the onboarding flow, do they create an account, and all the data from the onboarding flow gets written to the database. ```

Does something like this exist out there, or have you found a way to make the above work? Links to functional code (even if 60% to 70% functional based on what I need) would be great and a huge time-saver. Thank you all...
25 Dec
6 months ago

connecteev left a reply on How To Compact + Uglify + Strip Unused CSS And JS For Production Deploys?

thanks for the reply. Doesn't work with mangle: true

While terser: {} runs, it doesn't seem to do anything:

  1. Remove comments from js
  2. Minify JS

I ran this beforehand: npm install terser-webpack-plugin --save-dev

My config:

mix.options({
    terser: {}, 
});

connecteev started a new conversation How To Compact + Uglify + Strip Unused CSS And JS For Production Deploys?

Do any folks have experience with production deploys? I'd like to do the following on production, to discourage people from copying the front end source code, and also to keep the file sizes as tight as possible. Here are my requirements:

CSS (both inline CSS as well as CSS in files included using )

  1. Strip all whitespace and comments from my CSS
  2. Change all CSS rules and classnames from clean names to ugly names, like ".testimonials_content" to ".xhdy3672" (this would need to modify the CSS rules in the HTML / Blade templates too)
  3. (If possible) remove unused CSS rules that are not referenced

JS (both inline JS in HTML using tags as well as JS in files included using >)

  1. Strip all whitespace and comments from my JS
  2. Change all JS variables and function names from clean names to ugly names, like "SwipeSlide()" to "xswjnd28()" (this would need to modify the JS rules in the HTML / Blade templates too)
  3. (If possible) remove unused JS code that is not referenced.

I'm currently using Laravel Mix (wrapper for Webpack). My webpack.mix.js file looks like this:

const mix = require('laravel-mix');
require('laravel-mix-tailwind');

mix.options({
/*
    purifyCss: true // removes unused CSS, Buggy. DO NOT USE
*/
    clearConsole: true, // in watch mode, clears console after every build

});

mix.js('resources/js/app.js', 'public/js')
    .sass('resources/sass/app.scss', 'public/css')
    .sass('resources/sass/test.scss', 'public/css');

I'm not very familiar with Webpack, but in my experience, using Laravel Mix with 'purifyCss=true' did not work. I do need something that would hit all of the use cases above 9for both the CSS and JS). Is this possible with Laravel Mix, and what have you ben doing to solve for this?

10 Sep
10 months ago

connecteev started a new conversation Guide To Migrate Code From Cakephp 1.3 To Laravel 5.7

I have an old app I'm trying to migrate from Cakephp 1.3 to Laravel 5.7 Has anyone does this before, and what's the quickest and most efficient way to do this?

connecteev left a reply on Favorite Front-end Tools

I meant things like Bower and other build tools.

connecteev started a new conversation Favorite Front-end Tools

What are your favorite front-end tools for rapid development + production use?

29 Jun
4 years ago

connecteev left a reply on CURL Error 60: SSL Certificate Problem: Unable To Get Local Issuer Certificate

Have tried everything in this thread. No luck.

Keep seeing this error: cURL error 77: error setting certificate verify locations: CAfile: "C:\xampp\sendmail\cacert.pem CApath: none (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)

31 May
4 years ago

connecteev left a reply on Just Upgraded To A Monthly Subscription, But Cannot Download Videos?

@jimmck @fetch404 Thanks...I figured out that the problem was with the max connections. You cannot have more than a certain number of laracast tabs open at the same time....so limiting the number of connections helps.

connecteev started a new conversation Just Upgraded To A Monthly Subscription, But Cannot Download Videos?

I was under the impression that the videos could be downloaded after upgrading my membership...but whenever I try to do that, it says, "waiting for available socket"....anyone facing this issue? It would suck if we're being rate limited AFTER paying for a membership.

18 Feb
4 years ago

connecteev left a reply on Laracasts Forum Code

@toniperic See "Why isn't esoTalk being actively developed?" http://esotalk.org/blog/faq.html

connecteev left a reply on Laracasts Forum Code

@JeffreyWay Really liking what you've done with https://laracasts.com/discuss, esp the enhancements (leaderboard, making it responsive, etc). Any idea when this code is going to be open sourced?

  1. esotalk is dead,
  2. Flarum (https://github.com/flarum/core) has a gorgeous UI but still early in development and uses ember, which I want to stay away from.
  3. FluxBB 2 is a joke which leaves no good laravel-based open source forum out there.