PHP code example of tobymaxham / laravel-helper
1. Go to this page and download the library: Download tobymaxham/laravel-helper 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/ */
tobymaxham / laravel-helper example snippets
namespace App;
use TobyMaxham\Helper\Models\Logs\ChangeByUser;
use Illuminate\Database\Eloquent\Model;
class User extends Model
{
use ChangeByUser;
}
public function getCreatedByColumn()
{
return false;
}
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('posts', function (Blueprint $table) {
$table->increments('id');
$table->string('title');
$table->text('content');
MigrationHelper::addCreatedByUser($table);
$table->timestamps();
});
}