Search
 
SCRIPT & CODE EXAMPLE
 

PHP

Laravel adding Foreign Key Constraints

$table->foreignId('user_id')
      ->constrained("users") <- // You don't need to specify table if it matched laravel naming conventions.
      ->onUpdate('cascade')
      ->onDelete('cascade');
Comment

laravel Cannot add foreign key constraint

$table->bigInteger('user_id')->unsigned();
Comment

PREVIOUS NEXT
Code Example
Php :: check if string contains only whitespace php 
Php :: find over array object php find 
Php :: css not working in live laravel project 
Php :: how to named route resource laravel 
Php :: input file accept jpg jpeg png php 
Php :: php fetch mysql result as variable 
Php :: use font awesome in laravel 8 
Php :: get post info in php 
Php :: laral db innodb 
Php :: php artisan route cache 
Php :: hide all error in php 
Php :: time function in php 
Php :: if condition in php 
Php :: loop iteration laravel 
Php :: end foreach loop 
Php :: Delete quotes in php 
Php :: multi condition inside single if in php 
Php :: print in php 
Php :: php count occurrences of string in array 
Php :: french special characters php 
Php :: magento 2 db connection 
Php :: laravel faker example 
Php :: show woocommerce product variation in table php 
Php :: min function in php 
Php :: wherehas laravel search 
Php :: ubuntu apache php version 
Php :: rename migration laravel 
Php :: php get screen size 
Php :: php artisan make :migration with model 
Php :: mysql get number of rows php 
ADD CONTENT
Topic
Content
Source link
Name
8+1 =