1. Go to this page and download the library: Download arrtrust/tracker 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/ */
use Illuminate\Database\Eloquent\Model as Eloquent;
use Arrtrust\Tracker\Trackable;
use Arrtrust\Tracker\TrackableInterface;
class Node extends Eloquent implements TrackableInterface {
use Trackable;
}
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateNodeSiteViewPivotTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('node_site_view', function (Blueprint $table)
{
$table->integer('node_id')->unsigned();
$table->integer('site_view_id')->unsigned();
$table->foreign('node_id')
->references('id')
->on('nodes')
->onDelete('cascade');
$table->foreign('site_view_id')
->references('id')
->on('site_views')
->onDelete('cascade');
$table->primary(['node_id', 'site_view_id']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('node_site_view');
}
}
bash
php artisan vendor:publish
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.