2015年3月12日 星期四

Microsoft Critical Patch KB3002657 Cause NAS logon problem:

UN-Installation from Windows 2003 Server

* Go into Control Panel, Add or Remove Programs. Make sure "Show updates" is checked. Then click on the update and click Remove "KB3002657"

* After uninstall, users are able to logon and see their drive/directory.

2015年3月6日 星期五

Add User Data for Testing using seeding (Lavarel 5)

1)  Edit "DatabaseSeeder.php" under  database/seeds in the project directory.

2) Uncomment the following line:

$this->call('UserTableSeeder');

3) Add the following block of code:

use App\User;

class UserTableSeeder extends Seeder {

    public function run()
    {
        DB::table('users')->delete();

        User::create(array(
                'name' => 'admin',
                'email' => 'admin@test.com',
                'password' => Hash::make('password')
            ));
    }
}


4)  Run the following command to add data to the user table.

 php artisan db:seed 

2015年3月5日 星期四

Error Message when running PHP artisan migrate after installation

Command: php artisan migrate
 
 [PDOException]
 SQLSTATE[HY000] [1045] Access denied for user 'homestead'@'localhost' (using password: YES)

If you are not using Lavarel homestead, you have to change the setting in .env file in the project directory.

Orginal
DB_HOST=localhost
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret

Example for XAMPP/WAMP
DB_HOST=localhost
DB_DATABASE=myDB
DB_USERNAME=root
DB_PASSWORD=

* I create a database call myDB (using root with no password)



Create  a new project using Lavarel

Type command:

php composer create-project laravel/laravel  project_name  --prefer-dist


Note: install composer 1st.