• 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

how to identify the web server name of remote host

Laravel Excel::store file empty after stored

Merge key and value of array index [duplicate]

google content api for shopping

How can I make Laravel return a custom error for a JSON REST API

Laravel passport auth token not working after moving to different server

phpunit - testing is painfully slow

How to run a shell as root from php (apache)

how to loop through json response data using ajax jquery?

Must be of the type array, null given,

XML to CSV with PHP converter [problem with images grabing]

How to insert Google Adsense Code in PHP script?

Unable to guess the mime type as no guessers are available Laravel 5.2

How to get page number on dompdf PDF when using "view"

Respond with status code 401 on authentication failure using Laravel and Passport?

About Contact Privacy policy Terms and conditions