tenglongroy@gmail.com's avatar

Laravel 5.4 mistake in make:listener, IlluminateAuthEventsRegistered

This is not a question, but rather I found a mistake of Laravel.

It seems that when using command "php artisan make:listener SomeListener --event=Illuminate\Auth\Events\Registered", the generated listener has problems of "use IlluminateAuthEventsRegistered;" instead of putting / in between, and for "public function handle(Registered $event)", it's "IlluminateAuthEventsRegistered" for the class "Registered".

code is here:

'''<?php

namespace App\Listeners;

use IlluminateAuthEventsRegistered; use Illuminate\Queue\InteractsWithQueue; use Illuminate\Contracts\Queue\ShouldQueue;

class SomeListener { /** * Create the event listener. * * @return void */ public function __construct() {

}

/**
 * Handle the event.
 *
 * @param  IlluminateAuthEventsRegistered  $event
 * @return void
 */
public function handle(IlluminateAuthEventsRegistered $event)
{
    
}

} '''

0 likes
1 reply
neilherbertuk's avatar
Level 9

Thanks for trying to make the community aware for this, unfortunately​, the Laracast Discussion Boards are nothing officially to do with Laravel. All bug reports should be posted to the issues board on the official Laravel Framework Github repo - https://github.com/laravel/framework/issues

Please or to participate in this conversation.