Compare commits

...

4 Commits

Author SHA1 Message Date
王冠智
6b93b9672c Merge d218fcf074 into 8557d4f3d8 2023-07-25 18:47:35 +08:00
Julien Le Coupanec
8557d4f3d8 Merge pull request #337 from phaneendra24/adding-js-arrayMethod
adding the at() method
2023-07-11 12:20:48 +02:00
phaneendra
f8d75a7ccf adding the at method 2023-07-07 16:49:20 +05:30
王冠智 | Joe
d218fcf074 Migration added foreignId method
Laravel 7.x added foreignId method
2022-03-22 14:55:34 +08:00
2 changed files with 5 additions and 2 deletions

View File

@@ -418,8 +418,10 @@ $table->dropSpatialIndex('geo_location_spatialindex'); // Drop a spatial index f
// FOREIGN KEY CONSTRAINTS
$table->foreign('user_id')->references('id')->on('users'); // Create foreign key constraints.
$table->dropForeign('posts_user_id_foreign'); // Drop foreign key (accepts an array of strings).
$table->foreign('user_id')->references('id')->on('users'); // Create foreign key constraints.
$table->foreignId('user_id')->constrained('users'); // Create foreign key terser methods (7.x).
$table->foreignId('user_id')->constrained()->onUpdate('cascade')->onDelete('cascade'); // Specify the desired action for the "on delete" and "on update" properties of the constraint(7.x).
$table->dropForeign('posts_user_id_foreign'); // Drop foreign key (accepts an array of strings).
Schema::enableForeignKeyConstraints(); // Enable foreign key constraints within your migrations.
Schema::disableForeignKeyConstraints(); // Disable foreign key constraints within your migrations.

View File

@@ -72,6 +72,7 @@ array.splice(start, deleteCount, item1, item2, ...) // Adds and/or removes elem
arr.unshift([element1[, ...[, elementN]]]) // Adds one or more elements to the front of an array and returns the new length of the array.
// Instance: accessor methods
arr.at(index) // Returns the element at the specified index in the array.
arr.concat(value1[, value2[, ...[, valueN]]]) // Returns a new array comprised of this array joined with other array(s) and/or value(s).
arr.includes(searchElement, fromIndex) // Determines whether an array contains a certain element, returning true or false as appropriate.
arr.indexOf(searchElement[, fromIndex]) // Returns the first (least) index of an element within the array equal to the specified value, or -1 if none is found.