• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

Laravel: Create morphs() relationship nullable

phplaravelrelationship


PHP Snippet 1:

Schema::create('ps_assistances', function (Blueprint $table) {
    $table->bigIncrements('id');
    $table->string('assistance_number', 50)->nullable();
    $table->nullableMorphs('assitanceable');
});

PHP Snippet 2:

$table->nullableMorphs('assitanceable');

Related Snippets

MISSING UPDATES FOR: MEDIA Drupal 9

Access denied for user 'homestead'@'localhost' (using password: YES)

WooCommerce: Add/display Product or Variation custom field everywhere

Laravel Excel::store file empty after stored

How to pass data to all views in Laravel 5?

shell errors running php exec

Laravel Carbon get start + end of last week?

Edit XML in HTML form and submit to self

How to debug in WooCommerce 3+

Require a class from another class - php

how can I set a session variable in Drupal 8 and get it in a php script?

How to Make Laravel Eloquent "IN" Query?

How to properly start Laravel 8 with Bootstrap & authentication

Laravel 5: Is there a non-case sensitive way to sort a collection by an attribute?

laravel 5.6 bulk inserting json data

About Contact Privacy policy Terms and conditions