• 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

Valet, Xdebug after reboot Big Sur not working

dompdf and img tag, image wont show

Sort a multidimensional array by integer inside of a string value which is two levels down

How can I pass the list to the component variable in Laravel?

PHP file_get_contents function

Installing Composer - Internal Error

PHP Warning: Module already loaded in Unknown on line 0

How to get array values using foreach in laravel

How To Access A Column In M-M Relationship Table In Laravel

PHP array_filter with arguments

How to get result of the formula on import xlsx with maatwebsite using Laravel? I get formula and not value of the formula

Convert date and time to Jalali in Laravel

500 Internal Server Error on Ajax request. Not sure the origin of the problem

Laravel: Why is my variable not being set while it's in the construct function of the controller?

PHPSpreadsheet - How Do I Use Auto Migration Tool

About Contact Privacy policy Terms and conditions