在Laravel找不到的课程

时间:2014-09-15 10:46:38

标签: laravel laravel-4

我在控制器中有这个代码:

use Larabook\Registration\RegistrUserCommand;
use Laracasts\Commander\CommandBus;

public function store()
    {
        extract(Input::only('username','email','password'));

        $command = new RegisterUserCommand($username, $email, $password);

        $this->commandBus->execute($command);

在app / Larabook / Registration / RegisterUserCommand中我有:

<?php namespace Larabook\Registration;

class RegisterUserCommand {

    public $username;

    public $email;

    public $password;

    function __construct($username,$email, $password)
    {
        $this->email = $email;
        $this->password = $password;
        $this->username = $username;
    }
}

当我跑步时,我找不到Class'RegisterUserCommand'。

1 个答案:

答案 0 :(得分:1)

您的use声明中有一个拼写错误。变化:

use Larabook\Registration\RegistrUserCommand;

use Larabook\Registration\RegisterUserCommand;