admin KeywordController quickEdit
parent
f070d69f74
commit
916b6bf05d
|
|
@ -41,7 +41,7 @@ class KeywordController extends AdminController
|
||||||
amis()->TableColumn()->name('name')->label(__('keywords.name')),
|
amis()->TableColumn()->name('name')->label(__('keywords.name')),
|
||||||
amis()->TableColumn()->name('key')->label(__('keywords.key')),
|
amis()->TableColumn()->name('key')->label(__('keywords.key')),
|
||||||
amis()->TableColumn()->name('value')->label(__('keywords.value'))->quickEdit([
|
amis()->TableColumn()->name('value')->label(__('keywords.value'))->quickEdit([
|
||||||
// 'saveImmediately' => true,
|
'saveImmediately' => true,
|
||||||
]),
|
]),
|
||||||
$this->rowActions([
|
$this->rowActions([
|
||||||
$this->rowShowButton()->visible($user->can('keywords.show')),
|
$this->rowShowButton()->visible($user->can('keywords.show')),
|
||||||
|
|
@ -81,7 +81,7 @@ class KeywordController extends AdminController
|
||||||
['label' => __('keywords.image'), 'content' => amis()->Image()->name('image'), 'span' => 3],
|
['label' => __('keywords.image'), 'content' => amis()->Image()->name('image'), 'span' => 3],
|
||||||
['label' => __('keywords.images'), 'content' => amis()->Images()->name('images'), 'span' => 3],
|
['label' => __('keywords.images'), 'content' => amis()->Images()->name('images'), 'span' => 3],
|
||||||
['label' => __('keywords.sort'), 'content' => '${sort}', 'span' => 3],
|
['label' => __('keywords.sort'), 'content' => '${sort}', 'span' => 3],
|
||||||
['label' => __('keywords.description'), 'content' => '${description}', 'span' => 3],
|
['label' => __('keywords.description'), 'content' => amis()->TextareaControl()->name('description')->static()->label(false), 'span' => 3],
|
||||||
['label' => __('keywords.options'), 'content' => amis()->Json()->name('options'), 'span' => 3],
|
['label' => __('keywords.options'), 'content' => amis()->Json()->name('options'), 'span' => 3],
|
||||||
['label' => __('keywords.content'), 'content' => amis()->WangEditor()->height('auto')->name('content')->label(false)->static(), 'span' => 3],
|
['label' => __('keywords.content'), 'content' => amis()->WangEditor()->height('auto')->name('content')->label(false)->static(), 'span' => 3],
|
||||||
]));
|
]));
|
||||||
|
|
|
||||||
|
|
@ -112,10 +112,10 @@ class AdminPermissionSeeder extends Seeder
|
||||||
if ($resource == true) {
|
if ($resource == true) {
|
||||||
return $maps;
|
return $maps;
|
||||||
}
|
}
|
||||||
else if (is_array($resource)) {
|
if (is_array($resource)) {
|
||||||
return Arr::only($maps, $resource);
|
return Arr::only($maps, $resource);
|
||||||
}
|
}
|
||||||
|
|
||||||
return [];
|
return data_get($maps, $resource);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ namespace Tests\Feature;
|
||||||
// use Illuminate\Foundation\Testing\RefreshDatabase;
|
// use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||||
|
|
||||||
use App\Models\Keyword;
|
use App\Models\Keyword;
|
||||||
|
use Illuminate\Support\Facades\Process;
|
||||||
use Tests\TestCase;
|
use Tests\TestCase;
|
||||||
|
|
||||||
class ExampleTest extends TestCase
|
class ExampleTest extends TestCase
|
||||||
|
|
@ -14,7 +15,9 @@ class ExampleTest extends TestCase
|
||||||
*/
|
*/
|
||||||
public function test_the_application_returns_a_successful_response(): void
|
public function test_the_application_returns_a_successful_response(): void
|
||||||
{
|
{
|
||||||
$keyword = Keyword::findOrFail(20);
|
$result = Process::run('ipconfig')->throw();
|
||||||
dump($keyword->parent_ids);
|
if ($result->successful()) {
|
||||||
|
echo $result->output();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue