Skip to main content

Featured

Dhadi Game - An Indian War game

Hi Friends, Today i will introduce an indian traditional board game to android user I am very interested in playing dhadi game with my friends. Now that interest  becomes as an android game Here these are the playing instructions to the dhadi game Dhadi is a traditional indian game with two players.It runs with mind power between 2 players.You can play against your friends Features: Auto Move Suggestions Interesting Graphic View to game Time taken by two players will be shown individually Total movements shows Intresting background sounds and music music and sound on/off feature No permissions are needed to this app. Download the best Dhadi for Android now! https://play.google.com/store/apps/details?id=in.mjtech.daddy

Simple steps for installtion of laravel for biggeners

1. Goto server directory(www for wamp,htdocs for xampp,etc)
2. Run "git clone git@github.com:laravel/laravel.git" (git shows an internal or external error for windows users),do below
->goto this url in browser "https://github.com/laravel/laravel"
->click "clone or download"
->then click download zip
->extract that zip into server directory to a folder (in my case "rest" is the project name)
3. Now move to the project directory(rest) using "cd rest"
4. Now, run "composer install" (make sure you have installed composer in your pc,if u don't have first instll composer)
5. Rename .env.example file to .env use this command "rename .env.example .env"
6. Now, php artisan key:generate
7. open http://localhost/{project name}/public in my case(http://localhost/rest/public/)
that's it basic installation of laravel completed.

Now we will discuss about using database:

it is better to use migration for creating tables in laravel,this will autometically generate some dependencys
Creating tables using migration
1. update your local database details in .env file before u proceed to below steps
in your.env file update below fileds

[code language="php"]
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=your_database_name
DB_USERNAME=your_mysql_server_user_name
DB_PASSWORD=your_mysql_server_password

[/code]
1. After changing .env file run following command
"php artisan migrate" , this will create two tables in your database,here by default users,password_resets tables migrations are added by default by laravel

While running this command you may got this type exceptions
"[Illuminate\Database\QueryException]
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes (S
QL: alter table `users` add unique `users_email_unique`(`email`))"
If you got any exception like this means,you are using an old mysql server or maria db,
for this you need to add this line

[code language="php"]
use Illuminate\Support\Facades\Schema;

public function boot()
{
Schema::defaultStringLength(191);
}

[/code]
in AppServiceProvider.php located inside "project_folder/app/Providers"

2. If you want to create a new table simple run "php artisan make:migration create_table_name"
3. This will create a file with name xxxxx_xxx_xxx_xxx_create_table_name.php file,you can add fields what you need in up method there

Comments

Popular Posts