This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function onEdit($id = null, $payload = []) | |
{ | |
$model = $id ? $this->getModelValue() : null; | |
$tabs = AdminDisplay::tabbed(); | |
$main_form = AdminForm::panel() | |
->addBody([ | |
AdminFormElement::text('title', 'Название')->required(), | |
]) | |
; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php namespace App\Relations; | |
use Illuminate\Database\Eloquent\Builder; | |
use Illuminate\Database\Eloquent\Collection; | |
use Illuminate\Database\Eloquent\Relations\Relation; | |
/** | |
* 1. Define relation method in your model: | |
* > public function foo() | |
* > { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Admin\Models\Traits; | |
use Illuminate\Database\Eloquent\Model; | |
use Illuminate\Database\Eloquent\Builder; | |
use SleepingOwl\Admin\Traits\OrderableModel; | |
/** | |
* Trait OrderableModel. |