Buy your loved one the ultimate gift. Lifetime gift certificates are $100 off.

JeffreyWay

Founder at Laracasts

Experience

436,770

346 Best Reply Awards

  • Member Since 4 Years Ago
  • 188 Lessons Completed
  • 54 Favorites

21st November, 2017

JeffreyWay left a reply on I'm Not Overly Impressed With Laracasts... "laravel New App" = -bash: Laravel: Command Not Found • 3 weeks ago

@kvnkrft You haven't added the Composer global vendor directory to your path. I covered this here:

https://laracasts.com/series/laravel-from-scratch-2017/episodes/1?time=3:55

I recommend going through the video from scratch one more time. Every issue you're experiencing was covered in the video.

JeffreyWay left a reply on I'm Not Overly Impressed With Laracasts... "laravel New App" = -bash: Laravel: Command Not Found • 3 weeks ago

He has a directory called "code" I believe, but I didn't... anyhow.

You don't need a directory, called "code." It's just a folder name. Create it.

"laravel" returns: -bash: laravel: command not found

Sounds like you didn't properly install the Laravel executable. We cover how here: https://laracasts.com/series/laravel-from-scratch-2017/episodes/1?time=2:23

14th November, 2017

JeffreyWay left a reply on No Offence... Just A Question! • 4 weeks ago

Two milliseconds is :( ??

10th November, 2017

JeffreyWay left a reply on Praetorian • 1 month ago

You never know...

30th October, 2017

JeffreyWay left a reply on PI Button Bottom Right On Laracasts • 1 month ago

I wonder what it could be...

24th October, 2017

JeffreyWay left a reply on How Does Reply Get Added To Correct Thread In This Test? • 1 month ago

Notice that we call the factory’s make method instead of create. What actually adds the reply to the thread page is the post request, where we send through the attributes for the reply.

19th October, 2017

JeffreyWay left a reply on Profile • 1 month ago

Thanks, guys. This is fixed now.

13th October, 2017

JeffreyWay left a reply on Profile • 2 months ago

Some people want their profile private.

JeffreyWay left a reply on Lesson Request: Testing Vue • 2 months ago

12th October, 2017

JeffreyWay left a reply on Tweaking The Layout • 2 months ago

@Corban @bashy Double post bug is fixed. Was related to a sporadic faulty left join. :|

11th October, 2017

JeffreyWay left a reply on Tweaking The Layout • 2 months ago

If at all possible, I would love to see this as something we could set in our preferences.

No plans to make a two column layout configurable settings.

As a side note, I cannot figure out how to tell if someone has @-ed you. Is there any kind of notification system that I've just been missing this whole time?

You'll see a bell over your username in the nav-bar if you've been mentioned.

3rd July, 2017

JeffreyWay left a reply on Laravel-mix Generate Js File But Browser Not Detect That Functions. • 5 months ago

We're going to need more information. This is difficult to understand.

23rd June, 2017

JeffreyWay left a reply on Laravel Training • 5 months ago

@teckel - Thanks so much for the nice words. :|

If you've built thousands of apps since 1997, but can't piece together how to write a simple CRUD app in Laravel, then I think you're not being truthful about your experience here...

14th June, 2017

JeffreyWay started a new conversation Testing • 5 months ago

Testing

8th May, 2017

JeffreyWay left a reply on Blade Braces In A Thread Title Breaks The Page • 7 months ago

Fixed. :) Thanks.

26th April, 2017

JeffreyWay left a reply on Custom "type" To The Class • 7 months ago

@theUnforgiven Yep. Or wrap it in a little server-side flash() function that does it for you.

function flash($message, $type = 'success') {
    session()->flash('flash', $message);
    session()->flash('flashType', $type);
}

//

flash('Welcome Aboard', 'success');

return redirect('/');

JeffreyWay left a reply on Custom "type" To The Class • 7 months ago

@theUnforgiven I'd probably do something like along the lines of this:

<template>
    <div :class="classes" role="alert" v-show="show">
        <strong>Success!</strong> {{ body }}
    </div>
</template>

<script>
    export default {
        props: ['message', 'type'],

        data() {
            return {
                body: '',
                style: '',
                show: false
            }
        },

        computed: {
            classes() {
                return [
                    'alert',
                    `alert-${this.style}`,
                    'alert-flash'
                ];
            }
        },

        created() {
            if (this.message) {
                this.flash(this.message, this.type);
            }

            window.events.$on(
                'flash', (message, type) => this.flash(message, type)
            );
        },

        methods: {
            flash(message, type) {
                this.body = message;
                this.show = true;
                this.style = (type || 'success');

                this.hide();
            },

            hide() {
                setTimeout(() => {
                    this.show = false;
                }, 3000);
            }
        }
    };
</script>

<style>
    .alert-flash {
        position: fixed;
        right: 25px;
        bottom: 25px;
    }
</style>

Usage:

flash('A message here', 'warning');

30th March, 2017

JeffreyWay left a reply on How Do Disable Live Reload When Running Npm Run Watch? • 8 months ago

It's not on by default, so not sure what you're asking.

23rd March, 2017

JeffreyWay left a reply on Can I Keep Using Elixir/Gulp After Migrating To Laravel 5.4? • 8 months ago

Yes, you may freely use any tool that you want.

22nd March, 2017

JeffreyWay left a reply on Laravel Forge Is Down. 22 March 2017 • 8 months ago

It's all related to that Ubuntu security update. They broke everything again today, when they reverted their mistake from yesterday. So weird...

13th March, 2017

JeffreyWay left a reply on Laravel Mix And PhpUnit • 9 months ago

No. It doesn't make much sense for a tool like Webpack.

6th March, 2017

JeffreyWay left a reply on Laravel 5.4 Dev Npm Run Dev Error • 9 months ago

@AccAdmin - It's because you have two different versions installed. Over the weekend, the cross-env team changed then path to to their bin directory, which we were referencing. You can fix this by doing npm install cross-env, and then updating your package.json npm script to be:

cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js

JeffreyWay left a reply on Why Laravel Dropped Elixir? Why Forcing Vue.js? What Is It That You Are Trying To Fix? • 9 months ago

@antraacks

It's just weird to me no other framework does this.

Imagine Django promoting Angular or Ruby On Rails Promoting React.

Rails is famous for promoting JS frameworks. Bad example.

and yes I can go and delete everything and keep my original package but if something is not broke what exactly are you guys fixing?

Dude, we're trying to make it easier to build applications. The core team likes Vue a lot and think it pairs well with Laravel. So we include a couple lines in a package.json file to get you started. Delete them, if you love Angular. Done.

JeffreyWay left a reply on Why Laravel Dropped Elixir? Why Forcing Vue.js? What Is It That You Are Trying To Fix? • 9 months ago

For all we know, there can be nothing except that they like VueJS or feel it guides/helps majority of users to build complete applications..

Or perhaps there is more behind the scenes, maybe Taylor has a stake in VueJS, or maybe Laravel is sponsored by VueJS,..

Guys, take your tinfoil hats off.

JeffreyWay left a reply on Why Laravel Dropped Elixir? Why Forcing Vue.js? What Is It That You Are Trying To Fix? • 9 months ago

@ANTRACKS Good grief.

But most major companies don't use Vue.js we use React or Angular.

Awesome. Then use React or Angular.

I can't remember on what version you guys started putting Vue in the package but ever since you guys started promoting it the support for other front end frameworks have gone to sht.

How so? Give examples? How is Laravel making it hard for you to include React in your projects??

Elixir worked perfectly there was no reason to drop it. Sass would compile super fast and even the largest react app now is 2x slower at compile.

Webpack is doing significantly more things than Elixir. But if Elixir was working great, use it. Nobody is making you do anything.

I want the old laravel back the one that I put neck on the line for.. the one that was a backend framework for php not a backend framework with a favorite front end framework.

Pro Tip: Delete the package.json file in a fresh Laravel app, and you have your old Laravel back.

But people come to you guys for the backend not to force down our throats VUE.JS!!!

Decaffeinated brands exist on the market.

I'll be honest this will be the last time I use laravel for any new project.

k.

2nd March, 2017

JeffreyWay left a reply on Laravel 5.4 Npm Run Watch Not Working • 9 months ago

Update node and npm. nodejs..org

JeffreyWay left a reply on How To Configure IncludePaths For SASS On Mix? • 9 months ago

I think you can do:

mix.sass('resources/assets/sass/app.scss', 'public/css', {
    includePaths: ["absolute/path/a", "absolute/path/b"]
});

JeffreyWay left a reply on Laravel Mix Versioning Issue • 9 months ago

@rachid_rafia I'm thinking that you have an old version of Laravel Mix installed. I just tried out your example code, and everything versioned properly.

https://www.dropbox.com/s/ca2md64krn5okc9/Screenshot%202017-03-02%2009.23.36.png?dl=0

For your other comment, if you're using a bunch of legacy plugins and scripts that weren't build with Webpack in mind, then mix.scripts() or mix.combine() (same thing) are what you want.

27th February, 2017

JeffreyWay left a reply on How To Write A Testimonial About This Site • 9 months ago

@CHIBYKE - You can shoot me an email and we'll add it to the testimonials page. :)

https://laracasts.com/contact

23rd February, 2017

JeffreyWay left a reply on Mix - Combine All Js In Folder • 9 months ago

@stwilson - You're using an old version of Laravel Mix. Do npm update laravel-mix.

JeffreyWay left a reply on Laravel 5.4 Errors On Npm Run Dev Error: Cannot Find Module '\..\$npm_package_config_webpack' • 9 months ago

@ANIMALINSTINCT For your first issue, it turns out that referencing Node config variables requires a completely different syntax in Windows, versus Mac or Linux. This has been fixed.

Update your package.json to look like this:

  "scripts": {
    "dev": "node node_modules/cross-env/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
    "watch": "node node_modules/cross-env/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
    "watch-poll": "node node_modules/cross-env/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --watch-poll --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
    "hot": "node node_modules/cross-env/bin/cross-env.js NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
    "production": "node node_modules/cross-env/bin/cross-env.js NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
  }

Also, run npm update laravel-mix.

21st February, 2017

JeffreyWay left a reply on Laravel Mix And React Js • 9 months ago

Update Laravel Mix.

20th February, 2017

JeffreyWay left a reply on Laravel Mix And React Js • 9 months ago

@VernonGrant Yeah the GitHub repo will have the latest docs, but I have a todo item to update the Laravel.com docs with some of the new stuff in the last few weeks.

JeffreyWay left a reply on Laravel Mix And React Js • 9 months ago

mix.react('src', 'output');

JeffreyWay left a reply on Mix - Combine All Js In Folder • 9 months ago

mix.combine(['public/js/*'], 'public/combined.js');

Though you should be careful. Often, JavaScript files need to be loaded in the proper order.

JeffreyWay left a reply on Webpack Compile Order • 9 months ago

This is a Webpack-specific issue. There's an issue to get it fixed.

https://github.com/webpack/webpack/issues/215

JeffreyWay left a reply on Can I Version Specific File In Laravel Mix? • 9 months ago

Yes -

mix.version(['path/to/files.js']);

18th February, 2017

JeffreyWay left a reply on Laravel 5.4 MIX + Stylus • 9 months ago

@Dima I guess they haven't updated it yet.

https://www.dropbox.com/s/ofcoszi089n6fj8/Screenshot%202017-02-18%2013.24.59.png?dl=0

You can manually add it back in by doing:

col()
  column(arguments)

JeffreyWay left a reply on Laravel 5.4 MIX + Stylus • 9 months ago

@Dima - I think Jeet removed aliases like that with version 7, right?

JeffreyWay left a reply on Laravel 5.4 MIX + Stylus • 9 months ago

Rupture will automatically load in its mixins, so you don't need to explicitly import that. This setup is fully working for me.

https://www.dropbox.com/s/3e8i1filj6j1vu2/Screenshot%202017-02-18%2013.02.03.png?dl=0

webpack.mix.js

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

/*
 |--------------------------------------------------------------------------
 | 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.stylus('resources/assets/stylus/app.styl', 'public/css', {
    use: [
        require('rupture')(),
        require('nib')(),
        require('jeet')()
    ],
    import: [
        '~nib/index.styl',
        '~jeet/jeet.styl'
    ]
});
``


#### resources/assets/stylus/app.styl

```js
#back-to-top
  fixed bottom right // nib

section
    center(960px) // jeet

.thing
    tablet() // rupture
        background: blue

public/css/app.css

#back-to-top {
  position: fixed;
  bottom: 0;
  right: 0;
}
section {
  width: auto;
  max-width: 960px;
  float: none;
  display: block;
  margin-right: auto;
  margin-left: auto;
  padding-left: 0;
  padding-right: 0;
}
section::after {
  content: '';
  display: table;
  clear: both;
}

JeffreyWay left a reply on Laravel 5.4 MIX + Stylus • 9 months ago

Sure.

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

/*
 |--------------------------------------------------------------------------
 | 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.stylus('resources/assets/stylus/app.styl', 'public/css', {
    use: [
        require('rupture')() // npm install rupture
    ]
});

JeffreyWay left a reply on Laravel 5.4 MIX + Stylus • 9 months ago

@dima - Mix is significantly more powerful than Laravel Elixir. Stylus works with it out of the box.

laravel new project && cd project
npm install

Then update webpack.mix.js to be:

mix.stylus('resources/assets/stylus/app.styl', 'public/css');

And do npm run dev.

8th February, 2017

JeffreyWay left a reply on Just Combine Js-files • 10 months ago

Combining files isn't connected to your main Webpack bundle, so it should have no effect.

Is that the only thing in your webpack.mix.js file? Where is hammerjs coming from?

1st February, 2017

27th January, 2017

JeffreyWay left a reply on [5.4] Npm Run Watch Not Working • 10 months ago

@saaz I'd of course need more information to help debug. OS, Node/NPM version, etc. Using a VM or not?

Try adding the --watch-poll flag to your NPM script. Or just try:

node_modules/.bin/webpack --watch --watch-poll --config=node_modules/laravel-mix/setup/webpack.config.js

26th January, 2017

JeffreyWay left a reply on Can't Get Laravel Mix To Work - Frustration LIMIT Reached • 10 months ago

If you were just concatenating get the files with Elixir, then do the same thing with Mix. You can use mix.combine().

JeffreyWay left a reply on Can't Get Laravel Mix To Work - Frustration LIMIT Reached • 10 months ago

You shouldn't need to, because it's included in the sass-loader dependency that Mix has.

My guess is that something went wonky when you installed all of your Node dependencies. I'd do a rm -rf node_modules and then npm install from scratch.

JeffreyWay left a reply on Whats New In Laravel 5.4 Not In Searchbar • 10 months ago

Just a caching issue. It updates every couple of days.

I just manually cleared it, so you should see it now.

JeffreyWay left a reply on Can't Get Laravel Mix To Work - Frustration LIMIT • 10 months ago

"I got an error when running npm run dev that UIKIT is missing and not in the node_modules folder! What? Why is it all of sudden looking there? "

It's looking there because it can't find it locally, so it's now checking for an installed dependency. We'll need to see your JS files to know more.

"I don't have a vendor directory in node-sass!"

Are you sure you have node-sass installed? Try a fresh re-install.

Also, create threads like this on the Mix GitHub repo, so that we can actually help you.

http://github.com/jeffreyway/laravel-mix

JeffreyWay left a reply on [5.4 Laravel Mix] Unable To Change Js Output Path • 10 months ago

This is all fixed in the latest release. Update Mix.

Edit Your Profile
Update

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