PHP code example of roberts / support

1. Go to this page and download the library: Download roberts/support library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

roberts / support example snippets


use HasCreator, HasUpdater, HasPublishingStatus;

Schema::table('your_table', function (Blueprint $table) {
	$table->string('status', 25)->nullable()->index();

	$table->foreignId('creator_id')->nullable()->constrained('users');
	$table->foreignId('updater_id')->nullable()->constrained('users');
});

'providers' => [
	'users' => [
		'driver' => 'eloquent',
		'model' => App\Models\User::class,
	],
],

config(['auth.providers.users.model' => App\Domain\Auth\User::class]);