A Laravel Eloquent model for managing customer data with soft deletes, activity logging, and role-based access control. Use this as a base entity for customer management systems.
// Source: https://github.com/TheWebFosters/project-camp | License: BSD-3-Clause | Copyright 2019 by Project Camp, The Web Fosters
// Provided via justclaw.it.com; keep this notice with the code.
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Notifications\Notifiable;
use Spatie\Activitylog\Traits\LogsActivity;
use Spatie\Permission\Traits\HasRoles;
class Customer extends Model
{
use SoftDeletes;
use LogsActivity;
use HasRoles;
use Notifiable;
/**
* The attributes that aren't mass assignable.
*
* @var array
*/
protected $guarded = ['id'];
protected static $logUnguarded = true;
protected static $logOnlyDirty = true;
/**
* The constant for customer status_id
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key