Search
 
SCRIPT & CODE EXAMPLE
 

PHP

indexing in database laravel

Schema::create('comments', function (Blueprint $table) {
    $table->increments('id');

    //column we want as an index
    $table->integer('post_id')->unsigned();
    //defining the index
    $table->foreign('post_id')->references('id')->on('posts')
        ->onDelete('cascade');

    $table->string("comment");
    $table->timestamps();
});
Comment

PREVIOUS NEXT
Code Example
Php :: show widget using the shortcode from php 
Php :: laravel run command 
Php :: loop through objects in php 
Php :: php versions and features 
Php :: package manifest php error 
Php :: how do i use php read excel file 
Php :: how to declare variable in php 
Php :: error_reporting(E_ERROR) 
Php :: php if statement with multiple conditions 
Php :: @can in laravel 
Php :: php string concatenation 
Php :: queue jobs in laravel 
Php :: Redirect with named route in Laravel 
Php :: laravel get data from database by id 
Php :: check nulls in php 8 
Php :: laravel debugbar ServiceProvider to the providers 
Php :: phpspreadsheet 
Php :: php array merge without array_merge 
Php :: In PackageManifest.php line 131: Undefined index: name 
Php :: wordpress Simple Membership button name 
Php :: Remove Version from CSS and JS 
Php :: php slots 
Php :: php get sql update from session 
Php :: php header accept post request from same domain 
Php :: wp php get product attribute name without pa 
Php :: wordpress add_action echo on edit page 
Php :: php domdocument get elements one by one 
Php :: Input sanitization to prevent XSS 
Php :: ttl jwt 
Php :: set php variabe with javascript loca storage 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =