create foreign key laravel migration
Schema::table('posts', function (Blueprint $table) {
$table->unsignedInteger('user_id');
$table->foreign('user_id')->references('id')->on('users');
});Schema::table('posts', function (Blueprint $table) {
$table->unsignedBigInteger('user_id');
$table->foreign('user_id')->references('id')->on('users');
});$table->foreign('column_name')->references('id')->on('table_name')->onDelete('cascade');$table->bigInteger('votes');
Also in PHP:
- display php erros
- Using a variable outside of the while loop (scope)
- base64_encode php
- $mpdf
- array key exists php dont return
- C# http post request with file
- 500 server error laravel 7
- find in php
- check if some character exists in string php
- artisan clear
- dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.64.dylib Referenced from: /usr/local/bin/php Reason: image not found zsh: abort bin/console sw:cache:clear
- check gettype is string php
- display_errors php.ini
- 12:30 am time format validation in laravel
- date('r') php
- ajax project using php and jquery
- current date in codeigniter
- add shortcode in short description
- checking php version
- delete cache on host laravel
- convert string to uppercase php
- array key exist
- convert space to 20 php
- ddev laravel setup