php - ReflectionException Class Larabook\Forms\RegistrationForm does not exist -
unable move on, i'm following laracasts tutorial of larabook cannot move on i'm facing exception screenshot attached, plus i'm pasting code
<?php // registrationform.php location larabook\app\forms namespace larabook\forms; use laracasts\validation\formvalidator; class registrationform extends formvalidator{ /* validation rules */ protected $rules = [ 'username'=>'required|unique:users', 'email'=>'required|email|unique:users', 'password'=>'required|confirmed' ]; } <?php // controller use larabook\forms\registrationform; class registrationcontroller extends \basecontroller { /* show form register user */ private $registrationform; function __construct(registrationform $registrationform){ $this->registrationform = $registrationform; } public function create(){ return view::make('registration.create'); } public function store(){ $this->registrationform->validate(input::all()); $user = user::create( input::only('username','email','password') ); auth::login($user,false); return redirect::home(); } } <?php // app.php return array( /* |-------------------------------------------------------------------------- | application debug mode |-------------------------------------------------------------------------- | | when application in debug mode, detailed error messages | stack traces shown on every error occurs within | application. if disabled, simple generic error page shown. | */ 'debug' => true, /* |-------------------------------------------------------------------------- | application url |-------------------------------------------------------------------------- | | url used console generate urls when using | artisan command line tool. should set root of | application used when running artisan tasks. | */ 'url' => 'http://localhost', /* |-------------------------------------------------------------------------- | application timezone |-------------------------------------------------------------------------- | | here may specify default timezone application, | used php date , date-time functions. have gone | ahead , set sensible default out of box. | */ 'timezone' => 'utc', /* |-------------------------------------------------------------------------- | application locale configuration |-------------------------------------------------------------------------- | | application locale determines default locale used | translation service provider. free set value | of locales supported application. | */ 'locale' => 'en', /* |-------------------------------------------------------------------------- | application fallback locale |-------------------------------------------------------------------------- | | fallback locale determines locale use when current 1 | not available. may change value correspond of | language folders provided through application. | */ 'fallback_locale' => 'en', /* |-------------------------------------------------------------------------- | encryption key |-------------------------------------------------------------------------- | | key used illuminate encrypter service , should set | random, 32 character string, otherwise these encrypted strings | not safe. please before deploying application! | */ 'key' => 'key', 'cipher' => mcrypt_rijndael_128, /* |-------------------------------------------------------------------------- | autoloaded service providers |-------------------------------------------------------------------------- | | service providers listed here automatically loaded on | request application. feel free add own services | array grant expanded functionality applications. | */ 'providers' => array( 'illuminate\foundation\providers\artisanserviceprovider', 'illuminate\auth\authserviceprovider', 'illuminate\cache\cacheserviceprovider', 'illuminate\session\commandsserviceprovider', 'illuminate\foundation\providers\consolesupportserviceprovider', 'illuminate\routing\controllerserviceprovider', 'illuminate\cookie\cookieserviceprovider', 'illuminate\database\databaseserviceprovider', 'illuminate\encryption\encryptionserviceprovider', 'illuminate\filesystem\filesystemserviceprovider', 'illuminate\hashing\hashserviceprovider', 'illuminate\html\htmlserviceprovider', 'illuminate\log\logserviceprovider', 'illuminate\mail\mailserviceprovider', 'illuminate\database\migrationserviceprovider', 'illuminate\pagination\paginationserviceprovider', 'illuminate\queue\queueserviceprovider', 'illuminate\redis\redisserviceprovider', 'illuminate\remote\remoteserviceprovider', 'illuminate\auth\reminders\reminderserviceprovider', 'illuminate\database\seedserviceprovider', 'illuminate\session\sessionserviceprovider', 'illuminate\translation\translationserviceprovider', 'illuminate\validation\validationserviceprovider', 'illuminate\view\viewserviceprovider', 'illuminate\workbench\workbenchserviceprovider', 'way\generators\generatorsserviceprovider', 'laracasts\commander\commanderserviceprovider', 'laracasts\validation\validationserviceprovider' ), /* |-------------------------------------------------------------------------- | service provider manifest |-------------------------------------------------------------------------- | | service provider manifest used laravel lazy load service | providers not needed each request, keep | list of of services. here, may set storage spot. | */ 'manifest' => storage_path().'/meta', /* |-------------------------------------------------------------------------- | class aliases |-------------------------------------------------------------------------- | | array of class aliases registered when application | started. however, feel free register many wish | aliases "lazy" loaded don't hinder performance. | */ 'aliases' => array( 'app' => 'illuminate\support\facades\app', 'artisan' => 'illuminate\support\facades\artisan', 'auth' => 'illuminate\support\facades\auth', 'blade' => 'illuminate\support\facades\blade', 'cache' => 'illuminate\support\facades\cache', 'classloader' => 'illuminate\support\classloader', 'config' => 'illuminate\support\facades\config', 'controller' => 'illuminate\routing\controller', 'cookie' => 'illuminate\support\facades\cookie', 'crypt' => 'illuminate\support\facades\crypt', 'db' => 'illuminate\support\facades\db', 'eloquent' => 'illuminate\database\eloquent\model', 'event' => 'illuminate\support\facades\event', 'file' => 'illuminate\support\facades\file', 'form' => 'illuminate\support\facades\form', 'hash' => 'illuminate\support\facades\hash', 'html' => 'illuminate\support\facades\html', 'input' => 'illuminate\support\facades\input', 'lang' => 'illuminate\support\facades\lang', 'log' => 'illuminate\support\facades\log', 'mail' => 'illuminate\support\facades\mail', 'paginator' => 'illuminate\support\facades\paginator', 'password' => 'illuminate\support\facades\password', 'queue' => 'illuminate\support\facades\queue', 'redirect' => 'illuminate\support\facades\redirect', 'redis' => 'illuminate\support\facades\redis', 'request' => 'illuminate\support\facades\request', 'response' => 'illuminate\support\facades\response', 'route' => 'illuminate\support\facades\route', 'schema' => 'illuminate\support\facades\schema', 'seeder' => 'illuminate\database\seeder', 'session' => 'illuminate\support\facades\session', 'softdeletingtrait' => 'illuminate\database\eloquent\softdeletingtrait', 'ssh' => 'illuminate\support\facades\ssh', 'str' => 'illuminate\support\str', 'url' => 'illuminate\support\facades\url', 'validator' => 'illuminate\support\facades\validator', 'view' => 'illuminate\support\facades\view', ), ); { /* composer.json */ "name": "laravel/laravel", "description": "the laravel framework.", "keywords": ["framework", "laravel"], "license": "mit", "require": { "laravel/framework": "4.2.*", "laracasts/commander":"~1.0", "laracasts/validation": "1.1.*" }, "autoload": { "classmap": [ "app/commands", "app/controllers", "app/models", "app/database/migrations", "app/database/seeds", "app/tests/testcase.php" ], "psr-4": { "larabook\\":"app/larabook" } }, "scripts": { "post-install-cmd": [ "php artisan clear-compiled", "php artisan optimize" ], "post-update-cmd": [ "php artisan clear-compiled", "php artisan optimize" ], "post-create-project-cmd": [ "php artisan key:generate" ] }, "config": { "preferred-install": "dist" }, "minimum-stability": "stable", "require-dev": { "way/generators": "~2.0", "codeception/codeception":"~2.0", "laracasts/testdummy":"~1.0" } }
i don't know wrong code, tried change spelling mistakes recreating project again stuck here, don't know i'm missing out here.
i believe typo mistake if correct.
registrationform.php location = larabook\app\forms namespace should
namespace larabook\app\forms;
Comments
Post a Comment