Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Validator Class #2

Closed
zeke8402 opened this issue Jun 29, 2014 · 7 comments
Closed

Create Validator Class #2

zeke8402 opened this issue Jun 29, 2014 · 7 comments

Comments

@zeke8402
Copy link
Owner

I am already doing one validation with the customer database during a booking, to check to see if the customer already exists in the database, and there is many more areas in the app that need to have validation performed on them. This is going to get messy really fast, so a validator class will need to be implemented in the near future.

@zeke8402 zeke8402 modified the milestone: Finish user facing content Jun 29, 2014
@zeke8402
Copy link
Owner Author

I will add a validator library I found to the project for this issue. It will validate the form before submission and output any errors.

@bc110402922
Copy link

hi can i use mysql, what i change in that? code..

@zeke8402
Copy link
Owner Author

zeke8402 commented Jul 2, 2015

Specify your connection type in app/config/database.php, you should be able to use whatever you like (thats supported by Laravel) as I don't believe I use any functions specific to one database.

@bc110402922
Copy link

dear you mean just change , you are using 'default' => 'sqllite', and i replace it, with this.

'default' => 'mysql',
that's it ?
booking name of Db, i make it, in the php myadmin
then i run these commands
php artisan migrate:rollback
php artisan migrate
regards
waiting , if you share email id , then i can share, img , i have alot of error.

@zeke8402
Copy link
Owner Author

zeke8402 commented Jul 2, 2015

Yeah but below 'default' make sure your MySQL db has the correct credentials. I
tested this with MySQL so I know it works :)

@bc110402922
Copy link

'default' => 'sqlite', replace with 'default' => 'mysql',
its not working with when i replace, dear i am student please tell me in detail m right now i change in daatabse.php file, and change in just line number 29 'default' => 'sqlite', i just created booking name of database in mysql . but still data is not show in the DB,
regards

@zeke8402
Copy link
Owner Author

zeke8402 commented Jul 3, 2015

Right below that line, you need to actually define where your database is and give Laravel the right credentials, so you need to do something like this

'mysql' => array(
            'driver'    => 'mysql',
            'host'      => 'localhost',
            'database'  => 'booking',
            'username'  => 'root',
            'password'  => 'password',
            'charset'   => 'utf8',
            'collation' => 'utf8_unicode_ci',
            'prefix'    => '',
            'port'      => '8889',
        ),

You need to replace the host with wherever your database is, give it the correct username and password (user root, password password not recommended :P), and the correct port, then it wil work.

Good luck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants