composite unique between two columns laravel migration
public function up()
{
Schema::table('user_projects', function (Blueprint $table) {
$table->unique(["user_id", "project_id"], 'user_project_unique');
});
}
public function down()
{
Schema::table('user_projects', function (Blueprint $table) {
$table->dropUnique('user_project_unique');
});
}
$table->unique(['mytext', 'user_id']);
Also in PHP:
- adeleye ayodeji
- add validation for webp image in laravel
- create laravel project terminal
- add checkbox in server side datatable laravel
- base64 encode username password php example
- disable timestamps for a table
- exception php
- check if character in string php
- echo php dropdown from db and save it in a db
- apache php e_warnings e_notice off
- fetch value from json link in php
- check if letter is in string php
- filesize in php
- composer install laravel 7 not installing
- Error message: Allowed memory size of bytes exhausted wordpress
- Call to a member function diffForHumans() on string in
- asia time zone in php
- array get only the value without duplicate
- PackageManifest.php line 131: Undefined index: name
- add one day in date php
- convert string to date php
- change time format in php
- base decode 64 php
- artisan migrate