Skip to content

Instantly share code, notes, and snippets.

<?php namespace Acme\Demo\Models;
use Model;
use BusyRoomsCMS\Backend\Traits\BaseTrait;
/**
* Post Model
*/
class Post extends Model
{
# ===================================
# List Behavior Config
# ===================================
# Model List Column configuration
list: $/acme/demo/models/category/columns.yaml
# Model Class name
modelClass: Acme\Demo\Models\Category
<?php
namespace Acme\Demo\Models;
use Model;
use October\Rain\Database\Pivot;
use Backend\Facades\BackendAuth;
class CategorizablePivot extends Pivot
{
<?php namespace BusyRoomsCMS\MediaManager\Updates;
use Schema;
use October\Rain\Database\Schema\Blueprint;
use October\Rain\Database\Updates\Migration;
class CreateImageableTable extends Migration
{
public function up()
{
<?php
if (GroupSettings::get('extras_module') == 'hotel') {
Extra::extend(function ($model) {
$model->belongsTo['hotel'] = 'BusyRoomsCMS\Group\Models\Hotel';
$model->rules['hotel'] = 'required';
$model->attributeNames['hotel'] = 'busyroomscms.group::lang.hotels.labels.hotel';
});
Extras::extendListColumns(function ($list, $model) {
if (!$list->model instanceof Extra) {
@iboved
iboved / Post.php
Last active May 27, 2019 08:17
Post model, Posts controller, fields.yaml, migration file
<?php namespace Acme\Demo\Models;
use Model;
/**
* Post Model
*/
class Post extends Model
{
/**
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Cache Store
|--------------------------------------------------------------------------
|
| This option controls the default cache connection that gets used while
@iboved
iboved / first_aid_log_1.txt
Created October 12, 2019 10:21
Running First Aid on "macOS Base System"
Running First Aid on "macOS Base System" (disk1s1)
NOTE: First Aid will temporarily lock the startup volume.
Verifying file system.
Volume could not be unmounted.
Performing fsck_hfs -fn -x /dev/rdisk1s1
Checking non-journaled HFS Plus Volume.
Checking extends overflow file.
Checking catalog file.
@iboved
iboved / first_aid_log_2.txt
Created October 12, 2019 10:32
Running First Aid on "Macintosh HD"
Running First Aid on "Macintosh HD" (disk2s5)
Repairing file system.
Volume was successfully unmounted.
Performing fsck_apfs -y -x /dev/rdisk2s5
Checking the container superblock.
Checking the EFI jumpstart record.
Checking the space manager.
Checking the space manager free queue trees.
Checking the object map.
Oct 12 09:38:19 localhost opendirectoryd[213]: [default] Initialize trigger support
Oct 12 09:38:19 localhost opendirectoryd[213]: [default] Failed to open file <private> [2: No such file or directory]
Oct 12 09:38:19 localhost opendirectoryd[213]: [default] Failed to open file <private> [2: No such file or directory]
Oct 12 09:38:19 localhost opendirectoryd[213]: [default] created endpoint for mach service 'com.apple.private.opendirectoryd.rpc'
Oct 12 09:38:19 localhost opendirectoryd[213]: [session] Registered RPC over XPC 'reset_cache' for service 'com.apple.private.opendirectoryd.rpc'
Oct 12 09:38:19 localhost opendirectoryd[213]: [session] Registered RPC over XPC 'reset_online' for service 'com.apple.private.opendirectoryd.rpc'
Oct 12 09:38:19 localhost opendirectoryd[213]: [session] Registered RPC over XPC 'reset_statistics' for service 'com.apple.private.opendirectoryd.rpc'
Oct 12 09:38:19 localhost opendirectoryd[213]: [session] Registered RPC over XPC 'show' for service 'com.apple.private.opendirecto