Support the ongoing development of Laravel.io →
Laravel.io Testing Packages

Hi everyone. I am new in Laravel 5 here.

I faced some difficulty to compile SASS file by using Gulp.

I watch the screencast video from here.
Laravel Elixir Screencast

This is my code:

elixir(function(mix) {
    mix.sass('materialize.scss')
    .routes()
    .events()
    .phpUnit();
});

This is the error message.

D:\XAMPP\htdocs\membership-system\gulpfile.js:16
    .routes()
     ^
TypeError: undefined is not a function
    at D:\XAMPP\htdocs\membership-system\gulpfile.js:16:6
    at Elixir (D:\XAMPP\htdocs\membership-system\node_modules\laravel-elixir\ind
ex.js:3:5)
    at Object.<anonymous> (D:\XAMPP\htdocs\membership-system\gulpfile.js:14:1)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Liftoff.handleArguments (C:\Users\Wee Hong\AppData\Roaming\npm\node_modul
es\gulp\bin\gulp.js:116:3)

If I remove routes(), events() and phpUnit(), it manages to compile successfully. But it does not appear in my public/css/

Please give me some advises how to overcome this issue. Thank you and please excuse my poor English.

Last updated 3 years ago.
0

Things have changed since that screencast. Long story short, phpUnit() should still work, but events() and routes() are gone.

If you look at this commit, you can see that they were removed. https://github.com/laravel/elixir/commit/fe1a931010c50d5909864aa0592721bb4ba64ece

Last updated 9 years ago.
0

thomastkim said:

Things have changed since that screencast. Long story short, phpUnit() should still work, but events() and routes() are gone.

If you look at this commit, you can see that they were removed. https://github.com/laravel/elixir/commit/fe1a931010c50d5909864aa0592721bb4ba64ece

Hi @thomaskim,

Thank you for your reply.

If so, is there any Laracast screen to learn how to use Elixir? It is okay even need to subscribe. I am happy to doing it.

I want to learn as much as best practice of Laravel since I'm just step out my first step.

0

Sure. Jeffrey Way (same person who did the previous screencast) did a great series here: https://laracasts.com/series/painless-builds-with-laravel-elixir/episodes/1

I'd highly recommend all his videos.

0

thomastkim said:

Sure. Jeffrey Way (same person who did the previous screencast) did a great series here: https://laracasts.com/series/painless-builds-with-laravel-elixir/episodes/1

I'd highly recommend all his videos.

Hi Thomastkim,

Sorry for the late reply. I was busy 2 days ago.

Here's me sending millions of Thank You across!

Last updated 9 years ago.
0

i think he would appreciate million $ more ;)

0

Sign in to participate in this thread!

PHPverse

Your banner here too?

WeeHong weehong Joined 23 Aug 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.