• 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

Require a class from another class - php

Edit XML in HTML form and submit to self

PHP Fatal error: Class not found - PHPUnit

TesseractOCR not working for Laravel

PHPExcel How to set conditional formatting to change cell background color based on cells values

Add customer email and phone in "Order" column to admin orders list on Woocommerce

Method IlluminateAuthRequestGuard::logout does not exist Laravel Passport

Clients authentication and user authentication with laravel

PHPMyAdmin not working as intended at remote server. Error 500, $respond not found

Remove categories with all childs derived from parent category

Normalize DateInterval in PHP

PHP Get value from JSON [duplicate]

Woocommerce product attributes with hierarchy like categories

Class AppHttpControllersUserController Does Not Exist

How do I upload a laravel project on cPanel shared hosting?

About Contact Privacy policy Terms and conditions