Nemethrzr2 Laravel
Nemethrzr2 Laravel
Laravel telepítése (cont) Laravel telepítése (cont) Migration Columns methods reference
(copy) (cont)
- map: E:/Projects composer create-project --prefer-dist
// a host gépen a projectek mappájának elérése laravel/laravel ernax //azért ernax a project $table->double('column', 15, 8);
to: /home/vagrant/Projects neve mert a homestead.yaml-ben ernax.dev-
DOUBLE equivalent with precision, 15 digits
// a virtuális gépen a mappák elérése ként vettünk fel egy host nevet, azaz annak a
in total and 8 after the decimal point
sites: hostnévnek a nevét kell megadni amelyikhez a
- map: laravel.dev projectet szeretnénk létrehozni. $table->enum('choices', ['foo', 'bar']);
// a project elérése, mint a xamppnál a mysql workbench csatlakozása a homestead- 'bar']); ENUM equivalent to the table
localhost vagy 127.0.0.1/ hez
$table->float('amount');
to: /home/vagrant/Projects/laravel/public ip 192.168.10.10
//a virtuális gép url elérése port: 3306 FLOAT equivalent to the table
- map: homestead.dev user homestead
$table->increments('id');
to: /home/vagrant/Projects/homestead/public pw secret
Incrementing ID to the table (primary key)
databases: homstead futtatása, leállítása
//adatbázisok, amiket a projectekhez vagrant up / vagrant halt / vagrant ssh(ctrl+d $table->integer('votes');
használunk kilépés)
INTEGER equivalent to the table
- homestead
- laravel Migration Columns methods reference $table->json('options');
- (copy) JSON equivalent to the table
Host file szerkesztése:
$table->bigIncrements('id'); $table->longText('description');
A homestead.yaml-ben az ip-t kell
hozzárendelni a project nevéhez Incrementing ID using a big integer LONGTEXT equivalent to the table
pl.: 192.168.10.10 laravel.dev equivalent
$table->mediumInteger('numbers');
Ahhoz, hogy belépjünk a virtuális gépbe először
$table->bigInteger('votes'); MEDIUMINT equivalent to the table
bekell lépnünk a Homestead mappába (cd
Homestead) , majd a vagrant ssh parancsot kell BIGINT equivalent to the table
$table>mediumText('description');
kiadnunk. $table->binary('data'); MEDIUMTEXT equivalent to the table
A következő parancssal létrehozzuk a
BLOB equivalent to the table
projectünket: $table->nullableTimestamps();
$table->boolean('confirmed'); Same as timestamps(), except the fact that
BOOLEAN equivalent to the table this allows NULLs
$table->date('created_at') $table->tinyInteger('numbers');
$table->dateTime('created_at'); $table->string('email');
DECIMAL equivalent with a precision and VARCHAR equivalent with the length of a
scale string
$table->text('description');
$table- $table-
>string('my_column')- >string('my_colum
>default('my_default_value n')->nullable();
');
$table->dropPrimary('authors_id_primary');
$table->dropUnique('authors_email_unique');
$table->dropIndex('books_title_index'); $table-
>dropForeign('books_author_id_foreign');