repo
stringlengths
7
63
file_url
stringlengths
81
284
file_path
stringlengths
5
200
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:02:33
2026-01-05 05:24:06
truncated
bool
2 classes
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/src/Events/RoutingAdmin.php
src/Events/RoutingAdmin.php
<?php namespace TCG\Voyager\Events; use Illuminate\Queue\SerializesModels; class RoutingAdmin { use SerializesModels; public $router; public function __construct() { $this->router = app('router'); // @deprecate // event('voyager.admin.routing', $this->router); } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/src/Events/BreadDeleted.php
src/Events/BreadDeleted.php
<?php namespace TCG\Voyager\Events; use Illuminate\Queue\SerializesModels; use TCG\Voyager\Models\DataType; class BreadDeleted { use SerializesModels; public $dataType; public $data; public function __construct(DataType $dataType, $data) { $this->dataType = $dataType; $this->data = $data; event(new BreadChanged($dataType, $data, 'Deleted')); } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/src/Events/AlertsCollection.php
src/Events/AlertsCollection.php
<?php namespace TCG\Voyager\Events; use Illuminate\Queue\SerializesModels; class AlertsCollection { use SerializesModels; public $collection; public function __construct(array $collection) { $this->collection = $collection; // @deprecate // event('voyager.alerts.collecting', $collection); } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/src/Events/MediaFileAdded.php
src/Events/MediaFileAdded.php
<?php namespace TCG\Voyager\Events; use Illuminate\Queue\SerializesModels; class MediaFileAdded { use SerializesModels; public $path; public function __construct($path) { $this->path = $path; } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/src/Events/TableUpdated.php
src/Events/TableUpdated.php
<?php namespace TCG\Voyager\Events; use Illuminate\Queue\SerializesModels; class TableUpdated { use SerializesModels; public $name; public function __construct(array $name) { $this->name = $name; event(new TableChanged($name['name'], 'Updated')); } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/src/Events/BreadAdded.php
src/Events/BreadAdded.php
<?php namespace TCG\Voyager\Events; use Illuminate\Queue\SerializesModels; use TCG\Voyager\Models\DataType; class BreadAdded { use SerializesModels; public $dataType; public $data; public function __construct(DataType $dataType, $data) { $this->dataType = $dataType; $this->data = $data; event(new BreadChanged($dataType, $data, 'Added')); } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/src/FormFields/TimeHandler.php
src/FormFields/TimeHandler.php
<?php namespace TCG\Voyager\FormFields; class TimeHandler extends AbstractHandler { protected $codename = 'time'; public function createContent($row, $dataType, $dataTypeContent, $options) { return view('voyager::formfields.time', [ 'row' => $row, 'options' => $options, 'dataType' => $dataType, 'dataTypeContent' => $dataTypeContent, ]); } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/src/FormFields/DateHandler.php
src/FormFields/DateHandler.php
<?php namespace TCG\Voyager\FormFields; class DateHandler extends AbstractHandler { protected $codename = 'date'; public function createContent($row, $dataType, $dataTypeContent, $options) { return view('voyager::formfields.date', [ 'row' => $row, 'options' => $options, 'dataType' => $dataType, 'dataTypeContent' => $dataTypeContent, ]); } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/src/FormFields/SelectDropdownHandler.php
src/FormFields/SelectDropdownHandler.php
<?php namespace TCG\Voyager\FormFields; class SelectDropdownHandler extends AbstractHandler { protected $codename = 'select_dropdown'; public function createContent($row, $dataType, $dataTypeContent, $options) { return view('voyager::formfields.select_dropdown', [ 'row' => $row, 'options' => $options, 'dataType' => $dataType, 'dataTypeContent' => $dataTypeContent, ]); } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/src/FormFields/MultipleCheckboxHandler.php
src/FormFields/MultipleCheckboxHandler.php
<?php namespace TCG\Voyager\FormFields; class MultipleCheckboxHandler extends AbstractHandler { protected $codename = 'multiple_checkbox'; public function createContent($row, $dataType, $dataTypeContent, $options) { return view('voyager::formfields.multiple_checkbox', [ 'row' => $row, 'options' => $options, 'dataType' => $dataType, 'dataTypeContent' => $dataTypeContent, ]); } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/src/FormFields/HiddenHandler.php
src/FormFields/HiddenHandler.php
<?php namespace TCG\Voyager\FormFields; class HiddenHandler extends AbstractHandler { protected $codename = 'hidden'; public function createContent($row, $dataType, $dataTypeContent, $options) { return view('voyager::formfields.hidden', [ 'row' => $row, 'options' => $options, 'dataType' => $dataType, 'dataTypeContent' => $dataTypeContent, ]); } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/src/FormFields/MultipleImagesHandler.php
src/FormFields/MultipleImagesHandler.php
<?php namespace TCG\Voyager\FormFields; class MultipleImagesHandler extends AbstractHandler { protected $codename = 'multiple_images'; public function createContent($row, $dataType, $dataTypeContent, $options) { return view('voyager::formfields.multiple_images', [ 'row' => $row, 'options' => $options, 'dataType' => $dataType, 'dataTypeContent' => $dataTypeContent, ]); } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/src/FormFields/CodeEditorHandler.php
src/FormFields/CodeEditorHandler.php
<?php namespace TCG\Voyager\FormFields; class CodeEditorHandler extends AbstractHandler { protected $codename = 'code_editor'; public function createContent($row, $dataType, $dataTypeContent, $options) { return view('voyager::formfields.code_editor', [ 'row' => $row, 'options' => $options, 'dataType' => $dataType, 'dataTypeContent' => $dataTypeContent, ]); } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/src/FormFields/ColorHandler.php
src/FormFields/ColorHandler.php
<?php namespace TCG\Voyager\FormFields; class ColorHandler extends AbstractHandler { protected $codename = 'color'; public function createContent($row, $dataType, $dataTypeContent, $options) { return view('voyager::formfields.color', [ 'row' => $row, 'options' => $options, 'dataType' => $dataType, 'dataTypeContent' => $dataTypeContent, ]); } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/src/FormFields/CheckboxHandler.php
src/FormFields/CheckboxHandler.php
<?php namespace TCG\Voyager\FormFields; class CheckboxHandler extends AbstractHandler { protected $codename = 'checkbox'; public function createContent($row, $dataType, $dataTypeContent, $options) { return view('voyager::formfields.checkbox', [ 'row' => $row, 'options' => $options, 'dataType' => $dataType, 'dataTypeContent' => $dataTypeContent, ]); } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/src/FormFields/SelectMultipleHandler.php
src/FormFields/SelectMultipleHandler.php
<?php namespace TCG\Voyager\FormFields; class SelectMultipleHandler extends AbstractHandler { protected $codename = 'select_multiple'; public function createContent($row, $dataType, $dataTypeContent, $options) { return view('voyager::formfields.select_multiple', [ 'row' => $row, 'options' => $options, 'dataType' => $dataType, 'dataTypeContent' => $dataTypeContent, ]); } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/src/FormFields/CoordinatesHandler.php
src/FormFields/CoordinatesHandler.php
<?php namespace TCG\Voyager\FormFields; class CoordinatesHandler extends AbstractHandler { protected $supports = [ 'mysql', 'pgsql', ]; protected $codename = 'coordinates'; public function createContent($row, $dataType, $dataTypeContent, $options) { return view('voyager::formfields.coordinates', [ 'row' => $row, 'options' => $options, 'dataType' => $dataType, 'dataTypeContent' => $dataTypeContent, ]); } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/src/FormFields/TextAreaHandler.php
src/FormFields/TextAreaHandler.php
<?php namespace TCG\Voyager\FormFields; class TextAreaHandler extends AbstractHandler { protected $codename = 'text_area'; public function createContent($row, $dataType, $dataTypeContent, $options) { return view('voyager::formfields.text_area', [ 'row' => $row, 'options' => $options, 'dataType' => $dataType, 'dataTypeContent' => $dataTypeContent, ]); } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/src/FormFields/RadioBtnHandler.php
src/FormFields/RadioBtnHandler.php
<?php namespace TCG\Voyager\FormFields; class RadioBtnHandler extends AbstractHandler { protected $name = 'Radio Button'; protected $codename = 'radio_btn'; public function createContent($row, $dataType, $dataTypeContent, $options) { return view('voyager::formfields.radio_btn', [ 'row' => $row, 'options' => $options, 'dataType' => $dataType, 'dataTypeContent' => $dataTypeContent, ]); } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/src/FormFields/TimestampHandler.php
src/FormFields/TimestampHandler.php
<?php namespace TCG\Voyager\FormFields; class TimestampHandler extends AbstractHandler { protected $codename = 'timestamp'; public function createContent($row, $dataType, $dataTypeContent, $options) { return view('voyager::formfields.timestamp', [ 'row' => $row, 'options' => $options, 'dataType' => $dataType, 'dataTypeContent' => $dataTypeContent, ]); } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/src/FormFields/MarkdownEditorHandler.php
src/FormFields/MarkdownEditorHandler.php
<?php namespace TCG\Voyager\FormFields; class MarkdownEditorHandler extends AbstractHandler { protected $codename = 'markdown_editor'; public function createContent($row, $dataType, $dataTypeContent, $options) { return view('voyager::formfields.markdown_editor', [ 'row' => $row, 'options' => $options, 'dataType' => $dataType, 'dataTypeContent' => $dataTypeContent, ]); } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/src/FormFields/NumberHandler.php
src/FormFields/NumberHandler.php
<?php namespace TCG\Voyager\FormFields; class NumberHandler extends AbstractHandler { protected $codename = 'number'; public function createContent($row, $dataType, $dataTypeContent, $options) { return view('voyager::formfields.number', [ 'row' => $row, 'options' => $options, 'dataType' => $dataType, 'dataTypeContent' => $dataTypeContent, ]); } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/src/FormFields/AbstractHandler.php
src/FormFields/AbstractHandler.php
<?php namespace TCG\Voyager\FormFields; use Illuminate\Support\Str; use TCG\Voyager\Traits\Renderable; abstract class AbstractHandler implements HandlerInterface { use Renderable; protected $name; protected $codename; protected $supports = []; public function handle($row, $dataType, $dataTypeContent) { $content = $this->createContent( $row, $dataType, $dataTypeContent, $row->details ); return $this->render($content); } public function supports($driver) { if (empty($this->supports)) { return true; } return in_array($driver, $this->supports); } public function getCodename() { if (empty($this->codename)) { $name = class_basename($this); if (Str::endsWith($name, 'Handler')) { $name = substr($name, 0, -strlen('Handler')); } $this->codename = Str::snake($name); } return $this->codename; } public function getName() { if (empty($this->name)) { $this->name = ucwords(str_replace('_', ' ', $this->getCodename())); } return $this->name; } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/src/FormFields/FileHandler.php
src/FormFields/FileHandler.php
<?php namespace TCG\Voyager\FormFields; class FileHandler extends AbstractHandler { protected $codename = 'file'; public function createContent($row, $dataType, $dataTypeContent, $options) { return view('voyager::formfields.file', [ 'row' => $row, 'options' => $options, 'dataType' => $dataType, 'dataTypeContent' => $dataTypeContent, ]); } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/src/FormFields/ImageHandler.php
src/FormFields/ImageHandler.php
<?php namespace TCG\Voyager\FormFields; class ImageHandler extends AbstractHandler { protected $codename = 'image'; public function createContent($row, $dataType, $dataTypeContent, $options) { return view('voyager::formfields.image', [ 'row' => $row, 'options' => $options, 'dataType' => $dataType, 'dataTypeContent' => $dataTypeContent, ]); } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/src/FormFields/MediaPickerHandler.php
src/FormFields/MediaPickerHandler.php
<?php namespace TCG\Voyager\FormFields; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Str; class MediaPickerHandler extends AbstractHandler { protected $codename = 'media_picker'; public function createContent($row, $dataType, $dataTypeContent, $options) { $content = ''; if (isset($options->max) && $options->max > 1) { if (is_array($dataTypeContent->{$row->field})) { $dataTypeContent->{$row->field} = json_encode($dataTypeContent->{$row->field}); } json_decode($dataTypeContent->{$row->field}); if (json_last_error() == JSON_ERROR_NONE) { $content = json_encode($dataTypeContent->{$row->field}); } else { $content = json_encode('[]'); } } else { $content = "'".$dataTypeContent->{$row->field}."'"; } if (isset($options->base_path)) { $options->base_path = str_replace('{uid}', Auth::user()->getKey(), $options->base_path); if (Str::contains($options->base_path, '{date:')) { $options->base_path = preg_replace_callback('/\{date:([^\/\}]*)\}/', function ($date) { return \Carbon\Carbon::now()->format($date[1]); }, $options->base_path); } if (Str::contains($options->base_path, '{random:')) { $options->base_path = preg_replace_callback('/\{random:([0-9]+)\}/', function ($random) { return Str::random($random[1]); }, $options->base_path); } if (!$dataTypeContent->getKey()) { $uuid = (string) Str::uuid(); $options->base_path = str_replace('{pk}', $uuid, $options->base_path); \Session::put($dataType->slug.'_path', $options->base_path); \Session::put($dataType->slug.'_uuid', $uuid); } else { $options->base_path = str_replace('{pk}', $dataTypeContent->getKey(), $options->base_path); } } return view('voyager::formfields.media_picker', [ 'row' => $row, 'options' => $options, 'dataType' => $dataType, 'content' => $content, ]); } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/src/FormFields/PasswordHandler.php
src/FormFields/PasswordHandler.php
<?php namespace TCG\Voyager\FormFields; class PasswordHandler extends AbstractHandler { protected $codename = 'password'; public function createContent($row, $dataType, $dataTypeContent, $options) { return view('voyager::formfields.password', [ 'row' => $row, 'options' => $options, 'dataType' => $dataType, 'dataTypeContent' => $dataTypeContent, ]); } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/src/FormFields/RichTextBoxHandler.php
src/FormFields/RichTextBoxHandler.php
<?php namespace TCG\Voyager\FormFields; class RichTextBoxHandler extends AbstractHandler { protected $codename = 'rich_text_box'; public function createContent($row, $dataType, $dataTypeContent, $options) { return view('voyager::formfields.rich_text_box', [ 'row' => $row, 'options' => $options, 'dataType' => $dataType, 'dataTypeContent' => $dataTypeContent, ]); } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/src/FormFields/TextHandler.php
src/FormFields/TextHandler.php
<?php namespace TCG\Voyager\FormFields; class TextHandler extends AbstractHandler { protected $codename = 'text'; public function createContent($row, $dataType, $dataTypeContent, $options) { return view('voyager::formfields.text', [ 'row' => $row, 'options' => $options, 'dataType' => $dataType, 'dataTypeContent' => $dataTypeContent, ]); } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/src/FormFields/HandlerInterface.php
src/FormFields/HandlerInterface.php
<?php namespace TCG\Voyager\FormFields; interface HandlerInterface { public function handle($row, $dataType, $dataTypeContent); public function createContent($row, $dataType, $dataTypeContent, $options); public function supports($driver); public function getCodename(); public function getName(); }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/src/FormFields/After/DescriptionHandler.php
src/FormFields/After/DescriptionHandler.php
<?php namespace TCG\Voyager\FormFields\After; class DescriptionHandler extends AbstractHandler { protected $codename = 'description'; public function visible($row, $dataType, $dataTypeContent, $options) { if (!isset($options->description)) { return false; } return !empty($options->description); } public function createContent($row, $dataType, $dataTypeContent, $options) { return '<span class="glyphicon glyphicon-question-sign" aria-hidden="true" data-toggle="tooltip" data-placement="right" data-html="true" title="'.$options->description.'"></span>'; } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/src/FormFields/After/AbstractHandler.php
src/FormFields/After/AbstractHandler.php
<?php namespace TCG\Voyager\FormFields\After; use TCG\Voyager\Traits\Renderable; abstract class AbstractHandler implements HandlerInterface { use Renderable; public function visible($row, $dataType, $dataTypeContent, $options) { return true; } public function handle($row, $dataType, $dataTypeContent) { $content = $this->createContent( $row, $dataType, $dataTypeContent, $row->details ); return $this->render($content); } public function getCodename() { return $this->codename; } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/src/FormFields/After/HandlerInterface.php
src/FormFields/After/HandlerInterface.php
<?php namespace TCG\Voyager\FormFields\After; interface HandlerInterface { public function visible($row, $dataType, $dataTypeContent, $options); public function handle($row, $dataType, $dataTypeContent); public function getCodename(); public function createContent($row, $dataType, $dataTypeContent, $options); }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/src/Policies/PostPolicy.php
src/Policies/PostPolicy.php
<?php namespace TCG\Voyager\Policies; use TCG\Voyager\Contracts\User; class PostPolicy extends BasePolicy { /** * Determine if the given model can be viewed by the user. * * @param \TCG\Voyager\Contracts\User $user * @param $model * * @return bool */ public function read(User $user, $model) { // Does this post belong to the current user? $current = $user->id === $model->author_id; return $current || $this->checkPermission($user, $model, 'read'); } /** * Determine if the given model can be edited by the user. * * @param \TCG\Voyager\Contracts\User $user * @param $model * * @return bool */ public function edit(User $user, $model) { // Does this post belong to the current user? $current = $user->id === $model->author_id; return $current || $this->checkPermission($user, $model, 'edit'); } /** * Determine if the given model can be deleted by the user. * * @param \TCG\Voyager\Contracts\User $user * @param $model * * @return bool */ public function delete(User $user, $model) { // Does this post belong to the current user? $current = $user->id === $model->author_id; // Has this already been deleted? $soft_delete = $model->deleted_at && in_array(\Illuminate\Database\Eloquent\SoftDeletes::class, class_uses_recursive($model)); return !$soft_delete && ($current || $this->checkPermission($user, $model, 'delete')); } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/src/Policies/UserPolicy.php
src/Policies/UserPolicy.php
<?php namespace TCG\Voyager\Policies; use TCG\Voyager\Contracts\User; class UserPolicy extends BasePolicy { /** * Determine if the given model can be viewed by the user. * * @param \TCG\Voyager\Contracts\User $user * @param $model * * @return bool */ public function read(User $user, $model) { // Does this record belong to the current user? $current = $user->id === $model->id; return $current || $this->checkPermission($user, $model, 'read'); } /** * Determine if the given model can be edited by the user. * * @param \TCG\Voyager\Contracts\User $user * @param $model * * @return bool */ public function edit(User $user, $model) { // Does this record belong to the current user? $current = $user->id === $model->id; return $current || $this->checkPermission($user, $model, 'edit'); } /** * Determine if the given user can change a user a role. * * @param \TCG\Voyager\Contracts\User $user * @param $model * * @return bool */ public function editRoles(User $user, $model) { // Does this record belong to another user? $another = $user->id != $model->id; return $another && $user->hasPermission('edit_users'); } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/src/Policies/MenuItemPolicy.php
src/Policies/MenuItemPolicy.php
<?php namespace TCG\Voyager\Policies; use TCG\Voyager\Contracts\User; use TCG\Voyager\Facades\Voyager; class MenuItemPolicy extends BasePolicy { protected static $datatypes = null; protected static $permissions = null; /** * Check if user has an associated permission. * * @param User $user * @param object $model * @param string $action * * @return bool */ protected function checkPermission(User $user, $model, $action) { if (self::$permissions == null) { self::$permissions = Voyager::model('Permission')->all(); } if (self::$datatypes == null) { self::$datatypes = Voyager::model('DataType')::all()->keyBy('slug'); } $regex = str_replace('/', '\/', preg_quote(route('voyager.dashboard'))); $slug = preg_replace('/'.$regex.'/', '', $model->link(true)); $slug = str_replace('/', '', $slug); if ($str = self::$datatypes->get($slug)) { $slug = $str->name; } if ($slug == '') { $slug = 'admin'; } elseif ($slug == 'compass' && !\App::environment('local') && !config('voyager.compass_in_production', false)) { return false; } if (empty($action)) { $action = 'browse'; } // If permission doesn't exist, we can't check it! if (!self::$permissions->contains('key', $action.'_'.$slug)) { return true; } return $user->hasPermission($action.'_'.$slug); } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/src/Policies/BasePolicy.php
src/Policies/BasePolicy.php
<?php namespace TCG\Voyager\Policies; use Illuminate\Auth\Access\HandlesAuthorization; use TCG\Voyager\Contracts\User; use TCG\Voyager\Facades\Voyager; class BasePolicy { use HandlesAuthorization; protected static $datatypes = []; /** * Handle all requested permission checks. * * @param string $name * @param array $arguments * * @return bool */ public function __call($name, $arguments) { if (count($arguments) < 2) { throw new \InvalidArgumentException('not enough arguments'); } /** @var \TCG\Voyager\Contracts\User $user */ $user = $arguments[0]; /** @var $model */ $model = $arguments[1]; return $this->checkPermission($user, $model, $name); } /** * Determine if the given model can be restored by the user. * * @param \TCG\Voyager\Contracts\User $user * @param $model * * @return bool */ public function restore(User $user, $model) { // Can this be restored? return $model->deleted_at && $this->checkPermission($user, $model, 'delete'); } /** * Determine if the given model can be deleted by the user. * * @param \TCG\Voyager\Contracts\User $user * @param $model * * @return bool */ public function delete(User $user, $model) { // Has this already been deleted? $soft_delete = $model->deleted_at && in_array(\Illuminate\Database\Eloquent\SoftDeletes::class, class_uses_recursive($model)); return !$soft_delete && $this->checkPermission($user, $model, 'delete'); } /** * Check if user has an associated permission. * * @param \TCG\Voyager\Contracts\User $user * @param object $model * @param string $action * * @return bool */ protected function checkPermission(User $user, $model, $action) { $model_name = get_class($model); if (!isset(self::$datatypes[$model_name])) { $dataType = Voyager::model('DataType'); self::$datatypes[$model_name] = $dataType->where('model_name', $model_name)->first(); } if (!self::$datatypes[$model_name]) { throw new \Exception("Unable to find dataType with model: " . $model_name); } $dataType = self::$datatypes[$model_name]; return $user->hasPermission($action.'_'.$dataType->name); } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/src/Policies/SettingPolicy.php
src/Policies/SettingPolicy.php
<?php namespace TCG\Voyager\Policies; use TCG\Voyager\Contracts\User; class SettingPolicy extends BasePolicy { /** * Determine if the given user can browse the model. * * @param \TCG\Voyager\Contracts\User $user * @param $model * * @return bool */ public function browse(User $user, $model) { return $user->hasPermission('browse_settings'); } /** * Determine if the given model can be viewed by the user. * * @param \TCG\Voyager\Contracts\User $user * @param $model * * @return bool */ public function read(User $user, $model) { return $user->hasPermission('read_settings'); } /** * Determine if the given model can be edited by the user. * * @param \TCG\Voyager\Contracts\User $user * @param $model * * @return bool */ public function edit(User $user, $model) { return $user->hasPermission('edit_settings'); } /** * Determine if the given user can create the model. * * @param \TCG\Voyager\Contracts\User $user * @param $model * * @return bool */ public function add(User $user, $model) { return $user->hasPermission('add_settings'); } /** * Determine if the given model can be deleted by the user. * * @param \TCG\Voyager\Contracts\User $user * @param $model * * @return bool */ public function delete(User $user, $model) { return $user->hasPermission('delete_settings'); } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/tests/RolesTest.php
tests/RolesTest.php
<?php namespace TCG\Voyager\Tests; use Illuminate\Foundation\Testing\DatabaseTransactions; use Illuminate\Support\Facades\Auth; use TCG\Voyager\Models\Role; class RolesTest extends TestCase { use DatabaseTransactions; protected $user; protected $permission_id = 3; public function setUp(): void { parent::setUp(); Auth::loginUsingId(1); $this->user = Auth::user(); } /** * A basic functional test example. * * @return void */ public function testRoles() { // Adding a New Role $this->visit(route('voyager.roles.create')) ->type('superadmin', 'name') ->type('Super Admin', 'display_name') ->press(__('voyager::generic.submit')) ->seePageIs(route('voyager.roles.index')) ->seeInDatabase('roles', ['name' => 'superadmin']); // Editing a Role $this->visit(route('voyager.roles.edit', 2)) ->type('regular_user', 'name') ->press(__('voyager::generic.submit')) ->seePageIs(route('voyager.roles.index')) ->seeInDatabase('roles', ['name' => 'regular_user']); // Editing a Role $this->visit(route('voyager.roles.edit', 2)) ->type('user', 'name') ->press(__('voyager::generic.submit')) ->seePageIs(route('voyager.roles.index')) ->seeInDatabase('roles', ['name' => 'user']); // Get the current super admin role $superadmin_role = Role::where('name', '=', 'superadmin')->first(); // Deleting a Role $response = $this->call('DELETE', route('voyager.roles.destroy', $superadmin_role->id), ['_token' => csrf_token()]); $this->assertEquals(302, $response->getStatusCode()); $this->notSeeInDatabase('roles', ['name' => 'superadmin']); } /** * Edit role permissions. * * @return void */ public function testEditRolePermissions() { $this->notSeeInDatabase('permission_role', ['permission_id' => $this->permission_id, 'role_id' => 2]); Role::find(2)->permissions()->attach($this->permission_id); $this->visit(route('voyager.roles.edit', 2)) ->uncheck('permissions['.$this->permission_id.']') ->press(__('voyager::generic.submit')) ->seePageIs(route('voyager.roles.index')) ->notSeeInDatabase('permission_role', ['permission_id' => $this->permission_id, 'role_id' => 2]); } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/tests/DisabledTestException.php
tests/DisabledTestException.php
<?php namespace TCG\Voyager\Tests; use Illuminate\Foundation\Exceptions\Handler; class DisabledTestException extends Handler { public function __construct() { } public function report($e) { } public function render($request, $e) { throw $e; } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/tests/AlertTest.php
tests/AlertTest.php
<?php namespace TCG\Voyager\Tests; use TCG\Voyager\Alert; use TCG\Voyager\Facades\Voyager; class AlertTest extends TestCase { public function testAlertsAreRegistered() { $alert = (new Alert('test', 'warning')) ->title('Title'); Voyager::addAlert($alert); $alerts = Voyager::alerts(); $this->assertCount(1, $alerts); } public function testComponentRenders() { Voyager::addAlert((new Alert('test', 'warning')) ->title('Title') ->text('Text') ->button('Button', 'http://example.com', 'danger')); $alerts = Voyager::alerts(); $this->assertEquals('<strong>Title</strong>', $alerts[0]->components[0]->render()); $this->assertEquals('<p>Text</p>', $alerts[0]->components[1]->render()); $this->assertEquals("<a href='http://example.com' class='btn btn-danger'>Button</a>", $alerts[0]->components[2]->render()); } public function testAlertsRenders() { Voyager::addAlert((new Alert('test', 'warning')) ->title('Title') ->text('Text') ->button('Button', 'http://example.com', 'danger')); Voyager::addAlert((new Alert('foo')) ->title('Bar') ->text('Foobar') ->button('Link', 'http://example.org')); $this->assertXmlStringEqualsXmlFile( __DIR__.'/rendered_alerts.html', view('voyager::alerts')->render() ); } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/tests/BreadMediaUploadTest.php
tests/BreadMediaUploadTest.php
<?php namespace TCG\Voyager\Tests; use Illuminate\Http\UploadedFile; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Storage; use TCG\Voyager\Models\DataRow; use TCG\Voyager\Models\DataType; use TCG\Voyager\Models\Page; class BreadMediaUploadTest extends TestCase { protected $file = 'test.txt'; protected $file_two = 'test2.txt'; protected $file_three = 'test.pdf'; protected $image_one = 'test1.png'; protected $image_two = 'test2.png'; protected $image_three = 'test3.png'; protected $details = '{"thumbnails":[{"name":"small","scale":"25%"},{"name":"medium","scale":"50%"},{"name":"large","scale":"75%"}]}'; protected $storage; public function setUp(): void { parent::setUp(); Auth::loginUsingId(1); $this->storage = Storage::disk(config('voyager.storage.disk')); } public function testMultipleImagesUpload() { $images = [$this->image_one, $this->image_two, $this->image_three]; $page = $this->uploadMedia($images, 'multiple_images'); $files = json_decode($page->image, true); $this->storage->assertExists($files[0]); $this->storage->assertExists($files[1]); $this->storage->assertExists($files[2]); $this->delete(route('voyager.pages.destroy', [$page->id])); } public function testMultipleImagesDelete() { $images = [$this->image_one, $this->image_two, $this->image_three]; $page = $this->uploadMedia($images, 'multiple_images'); $files = json_decode($page->image, true); $response = $this->post(route('voyager.pages.media.remove'), [ 'id' => $page->id, 'slug' => 'pages', 'field' => 'image', 'multi' => 'true', 'filename' => $files[1], ]); $this->storage->assertExists($files[0]); $this->storage->assertMissing($files[1]); $this->storage->assertExists($files[2]); $this->delete(route('voyager.pages.destroy', [$page->id])); } public function testMultipleImagesRemoveOnDelete() { $images = [$this->image_one, $this->image_two, $this->image_three]; $page = $this->uploadMedia($images, 'multiple_images'); $files = json_decode($page->image, true); $this->delete(route('voyager.pages.destroy', [$page->id])); $this->storage->assertMissing($files[0]); $this->storage->assertMissing($files[1]); $this->storage->assertMissing($files[2]); } public function testImageWithThumbnailsUpload() { $page = $this->uploadMedia([$this->image_one], 'image', json_decode($this->details)); $details = json_decode($this->details); foreach ($details->thumbnails as $thumbnail) { $path = preg_replace('/(.*)(\.[\w\d]{2,4})$/', '$1-'.$thumbnail->name.'$2', $page->image); $this->storage->assertExists($path); } $this->delete(route('voyager.pages.destroy', [$page->id])); } public function testImageWithThumbnailsDelete() { $page = $this->uploadMedia([$this->image_one], 'image', json_decode($this->details)); $response = $this->post(route('voyager.pages.media.remove'), [ 'id' => $page->id, 'slug' => 'pages', 'field' => 'image', 'multi' => 'false', 'filename' => $page->image, ]); $details = json_decode($this->details); foreach ($details->thumbnails as $thumbnail) { $path = preg_replace('/(.*)(\.[\w\d]{2,4})$/', '$1-'.$thumbnail->name.'$2', $page->image); $this->storage->assertMissing($path); } $this->delete(route('voyager.pages.destroy', [$page->id])); } public function testImageWithThumbnailsRemoveOnDelete() { $page = $this->uploadMedia([$this->image_one], 'image', json_decode($this->details)); $details = json_decode($this->details); $this->delete(route('voyager.pages.destroy', [$page->id])); foreach ($details->thumbnails as $thumbnail) { $path = preg_replace('/(.*)(\.[\w\d]{2,4})$/', '$1-'.$thumbnail->name.'$2', $page->image); $this->storage->assertMissing($path); } } public function testMultipleImagesWithThumbnailsUpload() { $images = [$this->image_one, $this->image_two, $this->image_three]; $page = $this->uploadMedia($images, 'multiple_images', json_decode($this->details)); $files = json_decode($page->image, true); $details = json_decode($this->details); foreach ($files as $file) { foreach ($details->thumbnails as $thumbnail) { $path = preg_replace('/(.*)(\.[\w\d]{2,4})$/', '$1-'.$thumbnail->name.'$2', $file); $this->storage->assertExists($path); } } $this->delete(route('voyager.pages.destroy', [$page->id])); } public function testMultipleImagesWithThumbnailsDelete() { $images = [$this->image_one, $this->image_two, $this->image_three]; $page = $this->uploadMedia($images, 'multiple_images', json_decode($this->details)); $files = json_decode($page->image, true); $response = $this->post(route('voyager.pages.media.remove'), [ 'id' => $page->id, 'slug' => 'pages', 'field' => 'image', 'multi' => 'true', 'filename' => $files[1], ]); $details = json_decode($this->details); foreach ($files as $file) { foreach ($details->thumbnails as $thumbnail) { $path = preg_replace('/(.*)(\.[\w\d]{2,4})$/', '$1-'.$thumbnail->name.'$2', $file); if ($file == $files[1]) { $this->storage->assertMissing($path); } else { $this->storage->assertExists($path); } } } $this->delete(route('voyager.pages.destroy', [$page->id])); } public function testMultipleImagesWithThumbnailsRemoveOnDelete() { $images = [$this->image_one, $this->image_two, $this->image_three]; $page = $this->uploadMedia($images, 'multiple_images', json_decode($this->details)); $files = json_decode($page->image, true); $details = json_decode($this->details); $this->delete(route('voyager.pages.destroy', [$page->id])); foreach ($files as $file) { foreach ($details->thumbnails as $thumbnail) { $path = preg_replace('/(.*)(\.[\w\d]{2,4})$/', '$1-'.$thumbnail->name.'$2', $file); $this->storage->assertMissing($path); } } } public function testFileUpload() { $page = $this->uploadMedia([$this->file], 'file'); $file = json_decode($page->image, true); $this->storage->assertExists($file[0]['download_link']); $this->delete(route('voyager.pages.destroy', [$page->id])); } public function testFileDelete() { $page = $this->uploadMedia([$this->file], 'file'); $file = json_decode($page->image, true); $this->call('POST', route('voyager.pages.media.remove'), [ 'id' => $page->id, 'slug' => 'pages', 'field' => 'image', 'multi' => 'true', 'filename' => $file[0]['original_name'], ]); $this->storage->assertMissing($file[0]['download_link']); $this->delete(route('voyager.pages.destroy', [$page->id])); } public function testValidationForFile() { $validation = '{"validation":{"rule":"mimes:txt"}}'; $page = $this->uploadMedia([$this->file, $this->file_three], 'file', json_decode($validation)); $this->assertTrue($page === null); $page = $this->uploadMedia([$this->file, $this->file_two], 'file', json_decode($validation)); $file = json_decode($page->image, true); $this->storage->assertExists($file[0]['download_link']); $this->storage->assertExists($file[1]['download_link']); $this->delete(route('voyager.pages.destroy', [$page->id])); } public function testFileRemoveOnDelete() { $page = $this->uploadMedia([$this->file], 'file'); $this->delete(route('voyager.pages.destroy', [$page->id])); $file = json_decode($page->image, true); $this->storage->assertMissing($file[0]['download_link']); } public function testUploadSecondFile() { // First file $page = $this->uploadMedia([$this->file], 'file'); // Second file $file = []; $file[] = UploadedFile::fake()->create($this->file_two, 1); $this->call('PUT', route('voyager.pages.update', $page->id), [ 'author_id' => $page->author_id, 'title' => $page->title, 'slug' => $page->slug, 'status' => $page->status, ], [], [ 'image' => $file, ]); $page = Page::where('slug', $page->slug)->firstOrFail(); $file = json_decode($page->image, true); $this->storage->assertExists($file[0]['download_link']); $this->storage->assertExists($file[1]['download_link']); $this->delete(route('voyager.pages.destroy', [$page->id])); } public function testImageUpload() { $page = $this->uploadMedia([$this->image_one], 'image'); $this->storage->assertExists($page->image); $this->delete(route('voyager.pages.destroy', [$page->id])); } public function testImageDelete() { $page = $this->uploadMedia([$this->image_one], 'image'); $response = $this->post(route('voyager.pages.media.remove'), [ 'id' => $page->id, 'slug' => 'pages', 'field' => 'image', 'multi' => 'false', 'filename' => $page->image, ]); $this->storage->assertMissing($page->image); $this->delete(route('voyager.pages.destroy', [$page->id])); } public function testImageRemoveOnDelete() { $page = $this->uploadMedia([$this->image_one], 'image'); $this->delete(route('voyager.pages.destroy', [$page->id])); $this->storage->assertMissing($page->image); } private function uploadMedia($names, $type, $details = '') { // Change dataRow type and details $data_type_id = DataType::where('slug', 'pages')->first()->id; $data_row = DataRow::where(['data_type_id' => $data_type_id, 'field' => 'image'])->first(); $data_row->type = $type; $data_row->details = $details; $data_row->save(); switch ($type) { case 'image': $file = UploadedFile::fake()->image($names[0]); break; case 'file': $file = []; foreach ($names as $name) { $file[] = UploadedFile::fake()->create($name, 1); } break; case 'multiple_images': $file = []; foreach ($names as $name) { $file[] = UploadedFile::fake()->image($name); } break; } $this->call('POST', route('voyager.pages.store'), [ 'author_id' => 1, 'title' => 'Upload', 'slug' => 'upload-media', 'status' => 'ACTIVE', ], [], [ 'image' => $file, ]); $page = Page::where('slug', 'upload-media')->first(); return $page; } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/tests/FormfieldsTest.php
tests/FormfieldsTest.php
<?php namespace TCG\Voyager\Tests; use Illuminate\Http\UploadedFile; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Hash; use Illuminate\Support\Facades\Schema; use TCG\Voyager\Models\Category; use TCG\Voyager\Models\DataType; use TCG\Voyager\Models\Permission; class FormfieldsTest extends TestCase { public function setUp(): void { parent::setUp(); Auth::loginUsingId(1); } public function testFormfieldText() { $this->createBreadForFormfield('text', 'text', json_encode([ 'default' => 'Default Text', 'null' => 'NULL', ])); $this->visitRoute('voyager.categories.create') ->see('Default Text') ->type('New Text', 'text') ->press(__('voyager::generic.save')) ->seeRouteIs('voyager.categories.index') ->see('New Text') ->click(__('voyager::generic.edit')) ->seeRouteIs('voyager.categories.edit', 1) ->type('Edited Text', 'text') ->press(__('voyager::generic.save')) ->seeRouteIs('voyager.categories.index') ->see('Edited Text') ->click(__('voyager::generic.edit')) ->seeRouteIs('voyager.categories.edit', 1) ->type('NULL', 'text') ->press(__('voyager::generic.save')) ->seeRouteIs('voyager.categories.index') ->seeInDatabase('categories', [ 'text' => null, ]); } public function testFormfieldTextbox() { $this->createBreadForFormfield('text', 'text_area', json_encode([ 'default' => 'Default Text', ])); $this->visitRoute('voyager.categories.create') ->see('Default Text') ->type('New Text', 'text_area') ->press(__('voyager::generic.save')) ->seeRouteIs('voyager.categories.index') ->see('New Text') ->click(__('voyager::generic.edit')) ->seeRouteIs('voyager.categories.edit', 1) ->type('Edited Text', 'text_area') ->press(__('voyager::generic.save')) ->seeRouteIs('voyager.categories.index') ->see('Edited Text'); } public function testFormfieldCodeeditor() { $this->createBreadForFormfield('text', 'code_editor', json_encode([ 'default' => 'Default Text', ])); $this->visitRoute('voyager.categories.create') ->see('Default Text') ->type('New Text', 'code_editor') ->press(__('voyager::generic.save')) ->seeRouteIs('voyager.categories.index') ->see('New Text') ->click(__('voyager::generic.edit')) ->seeRouteIs('voyager.categories.edit', 1) ->type('Edited Text', 'code_editor') ->press(__('voyager::generic.save')) ->seeRouteIs('voyager.categories.index') ->see('Edited Text'); } public function testFormfieldMarkdown() { $this->createBreadForFormfield('text', 'markdown_editor'); $this->visitRoute('voyager.categories.create') ->type('# New Text', 'markdown_editor') ->press(__('voyager::generic.save')) ->seeRouteIs('voyager.categories.index') ->see('New Text') ->click(__('voyager::generic.edit')) ->seeRouteIs('voyager.categories.edit', 1) ->type('# Edited Text', 'markdown_editor') ->press(__('voyager::generic.save')) ->seeRouteIs('voyager.categories.index') ->see('Edited Text'); } public function testFormfieldRichtextbox() { $this->createBreadForFormfield('text', 'rich_text_box'); $this->visitRoute('voyager.categories.create') ->type('New Text', 'rich_text_box') ->press(__('voyager::generic.save')) ->seeRouteIs('voyager.categories.index') ->see('New Text') ->click(__('voyager::generic.edit')) ->seeRouteIs('voyager.categories.edit', 1) ->type('Edited Text', 'rich_text_box') ->press(__('voyager::generic.save')) ->seeRouteIs('voyager.categories.index') ->see('Edited Text'); } public function testFormfieldHidden() { $this->createBreadForFormfield('text', 'hidden', json_encode([ 'default' => 'Default Text', ])); $this->visitRoute('voyager.categories.create') ->see('Default Text') ->type('New Text', 'hidden') ->press(__('voyager::generic.save')) ->seeRouteIs('voyager.categories.index') ->see('New Text') ->click(__('voyager::generic.edit')) ->seeRouteIs('voyager.categories.edit', 1) ->type('Edited Text', 'hidden') ->press(__('voyager::generic.save')) ->seeRouteIs('voyager.categories.index') ->see('Edited Text'); } public function testFormfieldPassword() { $this->createBreadForFormfield('text', 'password'); $t = $this->visitRoute('voyager.categories.create') ->type('newpassword', 'password') ->press(__('voyager::generic.save')) ->seeRouteIs('voyager.categories.index'); $this->assertTrue(Hash::check('newpassword', Category::first()->password)); $t->click(__('voyager::generic.edit')) ->seeRouteIs('voyager.categories.edit', 1) ->press(__('voyager::generic.save')) ->seeRouteIs('voyager.categories.index'); $this->assertTrue(Hash::check('newpassword', Category::first()->password)); } public function testFormfieldNumber() { $this->createBreadForFormfield('integer', 'number', json_encode([ 'default' => 1, ])); $this->visitRoute('voyager.categories.create') ->see('1') ->type('2', 'number') ->press(__('voyager::generic.save')) ->seeRouteIs('voyager.categories.index') ->see('2') ->click(__('voyager::generic.edit')) ->seeRouteIs('voyager.categories.edit', 1) ->type('3', 'number') ->press(__('voyager::generic.save')) ->seeRouteIs('voyager.categories.index') ->see('3'); } public function testFormfieldCheckbox() { $this->createBreadForFormfield('boolean', 'checkbox', json_encode([ 'on' => 'Active', 'off' => 'Inactive', ])); $this->visitRoute('voyager.categories.create') ->see('Inactive') ->check('checkbox') ->press(__('voyager::generic.save')) ->seeRouteIs('voyager.categories.index') ->see('Active') ->click(__('voyager::generic.edit')) ->seeRouteIs('voyager.categories.edit', 1) ->uncheck('checkbox') ->press(__('voyager::generic.save')) ->seeRouteIs('voyager.categories.index') ->see('Inactive'); } public function testFormfieldTime() { $this->createBreadForFormfield('time', 'time'); $this->visitRoute('voyager.categories.create') ->type('12:50', 'time') ->press(__('voyager::generic.save')) ->seeRouteIs('voyager.categories.index') ->see('12:50') ->click(__('voyager::generic.edit')) ->seeRouteIs('voyager.categories.edit', 1) ->type('6:25', 'time') ->press(__('voyager::generic.save')) ->seeRouteIs('voyager.categories.index') ->see('6:25'); } public function testFormfieldDate() { $this->createBreadForFormfield('date', 'date', json_encode([ 'format' => '%Y-%m-%d', ])); $this->visitRoute('voyager.categories.create') ->type('2019-01-01', 'date') ->press(__('voyager::generic.save')) ->seeRouteIs('voyager.categories.index') ->see('2019-01-01') ->click(__('voyager::generic.edit')) ->seeRouteIs('voyager.categories.edit', 1) ->type('2018-12-31', 'date') ->press(__('voyager::generic.save')) ->seeRouteIs('voyager.categories.index') ->see('2018-12-31'); } public function testFormfieldTimestamp() { $this->createBreadForFormfield('timestamp', 'timestamp', json_encode([ 'format' => '%F %T', ])); $this->visitRoute('voyager.categories.create') ->type('2019-01-01 12:00:00', 'timestamp') ->press(__('voyager::generic.save')) ->seeRouteIs('voyager.categories.index') ->see('2019-01-01 12:00:00') ->click(__('voyager::generic.edit')) ->seeRouteIs('voyager.categories.edit', 1) ->type('2018-12-31 23:59:59', 'timestamp') ->press(__('voyager::generic.save')) ->seeRouteIs('voyager.categories.index') ->see('2018-12-31 23:59:59') ->click(__('voyager::generic.edit')) ->seeRouteIs('voyager.categories.edit', 1) ->type('', 'timestamp') ->press(__('voyager::generic.save')) ->seeRouteIs('voyager.categories.index') ->seeInDatabase('categories', [ 'timestamp' => null, ]); } public function testFormfieldColor() { $this->createBreadForFormfield('text', 'color'); $this->visitRoute('voyager.categories.create') ->type('#FF0000', 'color') ->press(__('voyager::generic.save')) ->seeRouteIs('voyager.categories.index') ->see('#FF0000') ->click(__('voyager::generic.edit')) ->seeRouteIs('voyager.categories.edit', 1) ->type('#00FF00', 'color') ->press(__('voyager::generic.save')) ->seeRouteIs('voyager.categories.index') ->see('#00FF00'); } public function testFormfieldRadiobtn() { $this->createBreadForFormfield('text', 'radio_btn', json_encode([ 'default' => 'radio1', 'options' => [ 'radio1' => 'Foo', 'radio2' => 'Bar', ], ])); $this->visitRoute('voyager.categories.create') ->select('radio1', 'radio_btn') ->press(__('voyager::generic.save')) ->seeRouteIs('voyager.categories.index') ->see('Foo') ->click(__('voyager::generic.edit')) ->seeRouteIs('voyager.categories.edit', 1) ->select('radio2', 'radio_btn') ->press(__('voyager::generic.save')) ->seeRouteIs('voyager.categories.index') ->see('Bar'); } public function testFormfieldSelectDropdown() { $this->createBreadForFormfield('text', 'select_dropdown', json_encode([ 'default' => 'radio1', 'options' => [ 'option1' => 'Foo', 'option2' => 'Bar', ], ])); $this->visitRoute('voyager.categories.create') ->select('option1', 'select_dropdown') ->press(__('voyager::generic.save')) ->seeRouteIs('voyager.categories.index') ->see('Foo') ->click(__('voyager::generic.edit')) ->seeRouteIs('voyager.categories.edit', 1) ->select('option2', 'select_dropdown') ->press(__('voyager::generic.save')) ->seeRouteIs('voyager.categories.index') ->see('Bar'); } public function testFormfieldFile() { $this->createBreadForFormfield('text', 'file'); $file = UploadedFile::fake()->create('test.txt', 1); $this->visitRoute('voyager.categories.create') ->attach([$file->getPathName()], 'file[]') ->press(__('voyager::generic.save')) ->seeRouteIs('voyager.categories.index') ->visitRoute('voyager.categories.create') ->press(__('voyager::generic.save')) ->seeRouteIs('voyager.categories.index') ->seeInDatabase('categories', [ 'file' => '[]', ]); } public function testFormfieldFilePreserve() { $this->createBreadForFormfield('text', 'file', json_encode([ 'preserveFileUploadName' => true, ])); $file = UploadedFile::fake()->create('test.txt', 1); $this->visitRoute('voyager.categories.create') ->attach([$file->getPathName()], 'file[]') ->press(__('voyager::generic.save')) ->seeRouteIs('voyager.categories.index') ->visitRoute('voyager.categories.create') ->press(__('voyager::generic.save')) ->seeRouteIs('voyager.categories.index') ->seeInDatabase('categories', [ 'file' => '[]', ]); } private function createBreadForFormfield($type, $name, $options = '') { Schema::dropIfExists('categories'); Schema::create('categories', function ($table) use ($type, $name) { $table->bigIncrements('id'); $table->{$type}($name)->nullable(); $table->timestamps(); }); // Delete old BREAD $this->delete(route('voyager.bread.delete', ['id' => DataType::where('name', 'categories')->first()->id])); // Create BREAD $this->visitRoute('voyager.bread.create', ['table' => 'categories']) ->select($name, 'field_input_type_'.$name) ->type($options, 'field_details_'.$name) ->type('TCG\\Voyager\\Models\\Category', 'model_name') ->press(__('voyager::generic.submit')) ->seeRouteIs('voyager.bread.index'); // Attach permissions to role Auth::user()->role->permissions()->syncWithoutDetaching(Permission::all()->pluck('id')); } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/tests/CompassTest.php
tests/CompassTest.php
<?php namespace TCG\Voyager\Tests; use Illuminate\Support\Facades\Auth; class CompassTest extends TestCase { public function setUp(): void { parent::setUp(); Auth::loginUsingId(1); } public function tearDown(): void { parent::tearDown(); if (file_exists(base_path('app/Models/TestModel.php'))) { unlink(base_path('app/Models/TestModel.php')); } } private function enableCompass() { $this->app['config']->set('voyager.compass_in_production', true); } private function logString($string) { \Illuminate\Support\Facades\Log::info($string); } public function testCantAccessCompass() { // Can't access compass because environment is != local (testing) $response = $this->call('GET', route('voyager.compass.index')); $this->assertEquals(403, $response->status()); } public function testCanAccessCompass() { // Can access compass because we set voyager.compass_in_production configuration to true $this->enableCompass(); $response = $this->call('GET', route('voyager.compass.index')); $this->assertEquals(200, $response->status()); } public function testCanSeeLaravelLog() { $info = 'This is a test log'; $this->logString($info); $this->enableCompass(); $this->visit(route('voyager.compass.index').'?log='.base64_encode('laravel.log')) ->see($info); } public function testCanExecuteCommand() { $this->enableCompass(); $response = $this->post(route('voyager.compass.index'), [ 'command' => 'make:model', 'args' => 'TestModel', ]); $this->assertStringContainsString('created successfully.', $response->response->content()); } public function testCannotExecuteUnknownCommand() { $this->enableCompass(); $response = $this->post(route('voyager.compass.index'), [ 'command' => 'unknown:command', 'args' => 'AnArgument', ]); $this->assertStringContainsString('The command &quot;unknown:command&quot; does not exist.', $response->response->content()); } public function testCanDeleteLaravelLog() { $this->enableCompass(); $response = $this->call('GET', route('voyager.compass.index').'?del='.base64_encode('laravel.log')); $this->assertEquals(302, $response->status()); // Redirect } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/tests/EventTest.php
tests/EventTest.php
<?php namespace TCG\Voyager\Tests; use Illuminate\Foundation\Testing\DatabaseTransactions; use Illuminate\Http\UploadedFile; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Event; use Illuminate\Support\Facades\Storage; use TCG\Voyager\Events\BreadAdded; use TCG\Voyager\Events\BreadDataAdded; use TCG\Voyager\Events\BreadDataDeleted; use TCG\Voyager\Events\BreadDataUpdated; use TCG\Voyager\Events\BreadDeleted; use TCG\Voyager\Events\BreadImagesDeleted; use TCG\Voyager\Events\BreadUpdated; use TCG\Voyager\Events\FileDeleted; use TCG\Voyager\Events\MediaFileAdded; use TCG\Voyager\Events\TableAdded; use TCG\Voyager\Events\TableDeleted; use TCG\Voyager\Events\TableUpdated; use TCG\Voyager\Models\DataType; use TCG\Voyager\Models\Page; class EventTest extends TestCase { use DatabaseTransactions; public function testBreadAddedEvent() { Event::fake(); Auth::loginUsingId(1); $this->post(route('voyager.bread.store'), [ 'name' => 'Toast', 'slug' => 'toast', 'display_name_singular' => 'toast', 'display_name_plural' => 'toasts', 'icon' => 'fa fa-toast', 'description' => 'This is a toast', ]); Event::assertDispatched(BreadAdded::class, function ($event) { return $event->dataType->name === 'Toast' || $event->dataType->slug === 'toast' || $event->dataType->display_name_singular === 'toast' || $event->dataType->display_name_plural === 'toasts' || $event->dataType->icon === 'fa fa-toast' || $event->dataType->description === 'This is a toast'; }); } public function testBreadUpdatedEvent() { Event::fake(); Auth::loginUsingId(1); $this->post(route('voyager.bread.store'), [ 'name' => 'Toast', 'slug' => 'toast', 'display_name_singular' => 'toast', 'display_name_plural' => 'toasts', 'icon' => 'fa fa-toast', 'description' => 'This is a toast', ]); Event::assertNotDispatched(BreadUpdated::class); $dataType = DataType::where('slug', 'toast')->firstOrFail(); $this->put(route('voyager.bread.update', [$dataType->id]), [ 'name' => 'Test', 'slug' => 'test', 'display_name_singular' => 'test', 'display_name_plural' => 'tests', 'icon' => 'fa fa-test', 'description' => 'This is a test', ]); Event::assertDispatched(BreadUpdated::class, function ($event) { return $event->dataType->name === 'Test' || $event->dataType->slug === 'test' || $event->dataType->display_name_singular === 'test' || $event->dataType->display_name_plural === 'tests' || $event->dataType->icon === 'fa fa-test' || $event->dataType->description === 'This is a test'; }); } public function testBreadDeletedEvent() { Event::fake(); Auth::loginUsingId(1); $this->post(route('voyager.bread.store'), [ 'name' => 'Toast', 'slug' => 'toast', 'display_name_singular' => 'toast', 'display_name_plural' => 'toasts', 'icon' => 'fa fa-toast', 'description' => 'This is a toast', ]); Event::assertNotDispatched(BreadDeleted::class); $dataType = DataType::where('slug', 'toast')->firstOrFail(); $this->delete(route('voyager.bread.delete', [$dataType->id])); Event::assertDispatched(BreadDeleted::class); } public function testBreadDataAddedEvent() { Event::fake(); Auth::loginUsingId(1); $this->post(route('voyager.pages.store'), [ 'author_id' => 1, 'title' => 'Toast', 'slug' => 'toasts', 'status' => 'ACTIVE', ]); Event::assertDispatched(BreadDataAdded::class); } public function testBreadDataUpdatedEvent() { Event::fake(); Auth::loginUsingId(1); $this->post(route('voyager.pages.store'), [ 'author_id' => 1, 'title' => 'Toast', 'slug' => 'toasts', 'status' => 'ACTIVE', ]); Event::assertNotDispatched(BreadDataUpdated::class); $page = Page::where('slug', 'toasts')->firstOrFail(); $this->put(route('voyager.pages.update', [$page->id]), [ 'title' => 'Test', 'slug' => 'tests', 'status' => 'INACTIVE', ]); Event::assertDispatched(BreadDataUpdated::class); } public function testBreadDataDeletedEvent() { Event::fake(); Auth::loginUsingId(1); $this->post(route('voyager.pages.store'), [ 'author_id' => 1, 'title' => 'Toast', 'slug' => 'toasts', 'status' => 'ACTIVE', ]); Event::assertNotDispatched(BreadDataDeleted::class); $page = Page::where('slug', 'toasts')->firstOrFail(); $this->delete(route('voyager.pages.destroy', [$page->id])); Event::assertDispatched(BreadDataDeleted::class); } public function testBreadImagesDeletedEvent() { Event::fake(); Auth::loginUsingId(1); Storage::fake(config('filesystems.default')); $image = UploadedFile::fake()->image('test.png'); $this->call('POST', route('voyager.pages.store'), [ 'author_id' => 1, 'title' => 'Toast', 'slug' => 'toasts', 'status' => 'ACTIVE', ], [], [ 'image' => $image, ]); Event::assertNotDispatched(BreadImagesDeleted::class); $page = Page::where('slug', 'toasts')->firstOrFail(); $this->delete(route('voyager.pages.destroy', [$page->id])); Event::assertDispatched(BreadImagesDeleted::class); } public function testFileDeletedEvent() { Event::fake(); Auth::loginUsingId(1); Storage::fake(config('filesystems.default')); $image = UploadedFile::fake()->image('test.png'); $this->call('POST', route('voyager.pages.store'), [ 'author_id' => 1, 'title' => 'Toast', 'slug' => 'toasts', 'status' => 'ACTIVE', ], [], [ 'image' => $image, ]); Event::assertNotDispatched(FileDeleted::class); $page = Page::where('slug', 'toasts')->firstOrFail(); $this->delete(route('voyager.pages.destroy', [$page->id])); Event::assertDispatched(FileDeleted::class); } public function testTableAddedEvent() { Event::fake(); Auth::loginUsingId(1); $this->post(route('voyager.database.store'), [ 'table' => [ 'name' => 'test', 'columns' => [ [ 'name' => 'id', 'type' => [ 'name' => 'integer', ], ], ], 'indexes' => [], 'foreignKeys' => [], 'options' => [], ], ]); Event::assertDispatched(TableAdded::class); } public function testTableUpdatedEvent() { Event::fake(); Auth::loginUsingId(1); $this->post(route('voyager.database.store'), [ 'table' => [ 'name' => 'test', 'columns' => [ [ 'name' => 'id', 'type' => [ 'name' => 'integer', ], ], ], 'indexes' => [], 'foreignKeys' => [], 'options' => [], ], ]); Event::assertNotDispatched(TableUpdated::class); $this->put(route('voyager.database.update', ['test']), [ 'table' => json_encode([ 'name' => 'test', 'oldName' => 'test', 'columns' => [ [ 'name' => 'id', 'oldName' => 'id', 'type' => [ 'name' => 'integer', ], ], ], 'indexes' => [], 'foreignKeys' => [], 'options' => [], ]), ]); Event::assertDispatched(TableUpdated::class); } public function testTableDeletedEvent() { Event::fake(); Auth::loginUsingId(1); $this->post(route('voyager.database.store'), [ 'table' => [ 'name' => 'test', 'columns' => [ [ 'name' => 'id', 'type' => [ 'name' => 'integer', ], ], ], 'indexes' => [], 'foreignKeys' => [], 'options' => [], ], ]); Event::assertNotDispatched(TableDeleted::class); $this->delete(route('voyager.database.destroy', ['test'])); Event::assertDispatched(TableDeleted::class); } public function testMediaFileAddedEvent() { Event::fake(); Auth::loginUsingId(1); Storage::fake(config('filesystems.default')); $image = UploadedFile::fake()->image('test.png'); $this->json('POST', route('voyager.media.upload'), ['file'=>$image, 'upload_path' => '/']); // Ensure file exists on disk $this->assertFileExists(public_path('storage/'.$image->name)); Event::assertDispatched(MediaFileAdded::class); } public function testNestedMediaFileAddedEvent() { Event::fake(); Auth::loginUsingId(1); Storage::fake(config('filesystems.default')); $image = UploadedFile::fake()->image('test.png'); $this->json('POST', route('voyager.media.upload'), ['file'=>$image, 'upload_path' => '/nested/']); // Ensure file exists on disk $this->assertFileExists(public_path('storage/nested/'.$image->name)); Event::assertDispatched(MediaFileAdded::class); } public function tearDown(): void { if (file_exists(public_path('storage/test.png'))) { unlink(public_path('storage/test.png')); } if (file_exists(public_path('storage/nested/test.png'))) { unlink(public_path('storage/nested/test.png')); } } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/tests/MultilingualTest.php
tests/MultilingualTest.php
<?php namespace TCG\Voyager\Tests; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Facades\DB; use TCG\Voyager\Facades\Voyager; use TCG\Voyager\Models\Page; use TCG\Voyager\Traits\Translatable; use TCG\Voyager\Translator; use TCG\Voyager\Translator\Collection; class MultilingualTest extends TestCase { public function setUp(): void { parent::setUp(); // Add another language config()->set('voyager.multilingual.locales', ['en', 'da']); // Turn on multilingual config()->set('voyager.multilingual.enabled', true); } public function testCheckingModelIsTranslatable() { $this->assertTrue(Voyager::translatable(TranslatableModel::class)); $this->assertTrue(Voyager::translatable(ActuallyTranslatableModel::class)); } public function testCheckingModelIsNotTranslatable() { $this->assertFalse(Voyager::translatable(NotTranslatableModel::class)); $this->assertFalse(Voyager::translatable(StillNotTranslatableModel::class)); } public function testGettingModelTranslatableAttributes() { $this->assertEquals(['title'], (new TranslatableModel())->getTranslatableAttributes()); $this->assertEquals([], (new ActuallyTranslatableModel())->getTranslatableAttributes()); } public function testGettingTranslatorCollection() { $collection = TranslatableModel::all()->translate('da'); $this->assertInstanceOf(Collection::class, $collection); $this->assertInstanceOf(Translator::class, $collection[0]); } public function testGettingTranslatorModelOfNonExistingTranslation() { $model = TranslatableModel::first()->translate('da'); $this->assertInstanceOf(Translator::class, $model); $this->assertEquals('da', $model->getLocale()); $this->assertEquals('Lorem Ipsum Post', $model->title); $this->assertFalse($model->getRawAttributes()['title']['exists']); $this->assertFalse($model->getRawAttributes()['title']['modified']); $this->assertEquals('da', $model->getRawAttributes()['title']['locale']); $this->assertEquals('Lorem Ipsum Post', $model->getOriginalAttribute('title')); } public function testGettingTranslatorModelOfExistingTranslation() { DB::table('translations')->insert([ 'table_name' => 'posts', 'column_name' => 'title', 'foreign_key' => 1, 'locale' => 'da', 'value' => 'Foo Bar Post', ]); $model = TranslatableModel::first()->translate('da'); $this->assertInstanceOf(Translator::class, $model); $this->assertEquals('da', $model->getLocale()); $this->assertEquals('Foo Bar Post', $model->title); $this->assertTrue($model->getRawAttributes()['title']['exists']); $this->assertFalse($model->getRawAttributes()['title']['modified']); $this->assertEquals('da', $model->getRawAttributes()['title']['locale']); $this->assertEquals('Lorem Ipsum Post', $model->getOriginalAttribute('title')); } public function testSavingNonExistingTranslatorModel() { $model = TranslatableModel::first()->translate('da'); $this->assertInstanceOf(Translator::class, $model); $this->assertEquals('da', $model->getLocale()); $this->assertEquals('Lorem Ipsum Post', $model->title); $this->assertFalse($model->getRawAttributes()['title']['exists']); $this->assertFalse($model->getRawAttributes()['title']['modified']); $this->assertEquals('da', $model->getRawAttributes()['title']['locale']); $this->assertEquals('Lorem Ipsum Post', $model->getOriginalAttribute('title')); $model->title = 'Danish Title'; $this->assertEquals('Danish Title', $model->title); $this->assertFalse($model->getRawAttributes()['title']['exists']); $this->assertTrue($model->getRawAttributes()['title']['modified']); $this->assertEquals('da', $model->getRawAttributes()['title']['locale']); $this->assertEquals('Lorem Ipsum Post', $model->getOriginalAttribute('title')); $model->save(); $this->assertEquals('Danish Title', $model->title); $this->assertTrue($model->getRawAttributes()['title']['exists']); $this->assertFalse($model->getRawAttributes()['title']['modified']); $this->assertEquals('da', $model->getRawAttributes()['title']['locale']); $this->assertEquals('Lorem Ipsum Post', $model->getOriginalAttribute('title')); $model = TranslatableModel::first()->translate('da'); $this->assertInstanceOf(Translator::class, $model); $this->assertEquals('da', $model->getLocale()); $this->assertEquals('Danish Title', $model->title); $this->assertTrue($model->getRawAttributes()['title']['exists']); $this->assertFalse($model->getRawAttributes()['title']['modified']); $this->assertEquals('da', $model->getRawAttributes()['title']['locale']); $this->assertEquals('Lorem Ipsum Post', $model->getOriginalAttribute('title')); } public function testSavingExistingTranslatorModel() { DB::table('translations')->insert([ 'table_name' => 'posts', 'column_name' => 'title', 'foreign_key' => 1, 'locale' => 'da', 'value' => 'Foo Bar Post', ]); $model = TranslatableModel::first()->translate('da'); $this->assertInstanceOf(Translator::class, $model); $this->assertEquals('da', $model->getLocale()); $this->assertEquals('Foo Bar Post', $model->title); $this->assertTrue($model->getRawAttributes()['title']['exists']); $this->assertFalse($model->getRawAttributes()['title']['modified']); $this->assertEquals('da', $model->getRawAttributes()['title']['locale']); $this->assertEquals('Lorem Ipsum Post', $model->getOriginalAttribute('title')); $model->title = 'Danish Title'; $this->assertEquals('Danish Title', $model->title); $this->assertTrue($model->getRawAttributes()['title']['exists']); $this->assertTrue($model->getRawAttributes()['title']['modified']); $this->assertEquals('da', $model->getRawAttributes()['title']['locale']); $this->assertEquals('Lorem Ipsum Post', $model->getOriginalAttribute('title')); $model->save(); $this->assertEquals('Danish Title', $model->title); $this->assertTrue($model->getRawAttributes()['title']['exists']); $this->assertFalse($model->getRawAttributes()['title']['modified']); $this->assertEquals('da', $model->getRawAttributes()['title']['locale']); $this->assertEquals('Lorem Ipsum Post', $model->getOriginalAttribute('title')); $model = TranslatableModel::first()->translate('da'); $this->assertInstanceOf(Translator::class, $model); $this->assertEquals('da', $model->getLocale()); $this->assertEquals('Danish Title', $model->title); $this->assertTrue($model->getRawAttributes()['title']['exists']); $this->assertFalse($model->getRawAttributes()['title']['modified']); $this->assertEquals('da', $model->getRawAttributes()['title']['locale']); $this->assertEquals('Lorem Ipsum Post', $model->getOriginalAttribute('title')); } public function testGettingTranslationMetaDataFromTranslator() { $model = TranslatableModel::first()->translate('da'); $this->assertFalse($model->translationAttributeExists('title')); $this->assertFalse($model->translationAttributeModified('title')); } public function testCreatingNewTranslation() { $model = TranslatableModel::first()->translate('da'); $model->createTranslation('title', 'Danish Title Here'); $model = TranslatableModel::first()->translate('da'); $this->assertInstanceOf(Translator::class, $model); $this->assertEquals('da', $model->getLocale()); $this->assertEquals('Danish Title Here', $model->title); $this->assertTrue($model->getRawAttributes()['title']['exists']); $this->assertFalse($model->getRawAttributes()['title']['modified']); $this->assertEquals('da', $model->getRawAttributes()['title']['locale']); } public function testUpdatingTranslation() { DB::table('translations')->insert([ 'table_name' => 'posts', 'column_name' => 'title', 'foreign_key' => 1, 'locale' => 'da', 'value' => 'Title', ]); $model = TranslatableModel::first()->translate('da'); $this->assertInstanceOf(Translator::class, $model); $this->assertEquals('da', $model->getLocale()); $this->assertEquals('Title', $model->title); $this->assertTrue($model->getRawAttributes()['title']['exists']); $this->assertFalse($model->getRawAttributes()['title']['modified']); $this->assertEquals('da', $model->getRawAttributes()['title']['locale']); $model->title = 'New Title'; $this->assertInstanceOf(Translator::class, $model); $this->assertEquals('da', $model->getLocale()); $this->assertEquals('New Title', $model->title); $this->assertTrue($model->getRawAttributes()['title']['exists']); $this->assertTrue($model->getRawAttributes()['title']['modified']); $this->assertEquals('da', $model->getRawAttributes()['title']['locale']); $model->save(); $this->assertInstanceOf(Translator::class, $model); $this->assertEquals('da', $model->getLocale()); $this->assertEquals('New Title', $model->title); $this->assertTrue($model->getRawAttributes()['title']['exists']); $this->assertFalse($model->getRawAttributes()['title']['modified']); $this->assertEquals('da', $model->getRawAttributes()['title']['locale']); $model = TranslatableModel::first()->translate('da'); $this->assertInstanceOf(Translator::class, $model); $this->assertEquals('da', $model->getLocale()); $this->assertEquals('New Title', $model->title); $this->assertTrue($model->getRawAttributes()['title']['exists']); $this->assertFalse($model->getRawAttributes()['title']['modified']); $this->assertEquals('da', $model->getRawAttributes()['title']['locale']); } public function testSearchingTranslations() { //Default locale $this->assertEquals(Page::whereTranslation('slug', 'hello-world')->count(), 1); //Default locale, but default excluded $this->assertEquals(Page::whereTranslation('slug', '=', 'hello-world', [], false)->count(), 0); //Translation, all locales $this->assertEquals(Page::whereTranslation('slug', 'ola-mundo')->count(), 1); //Translation, wrong locale-array $this->assertEquals(Page::whereTranslation('slug', '=', 'ola-mundo', ['de'])->count(), 0); //Translation, correct locale-array $this->assertEquals(Page::whereTranslation('slug', '=', 'ola-mundo', ['de', 'pt'])->count(), 1); //Translation, wrong locale $this->assertEquals(Page::whereTranslation('slug', '=', 'ola-mundo', 'de')->count(), 0); //Translation, correct locale $this->assertEquals(Page::whereTranslation('slug', '=', 'ola-mundo', 'pt')->count(), 1); } } class TranslatableModel extends Model { protected $table = 'posts'; use Translatable; /** * The attributes that are mass assignable. * * @var array */ protected $fillable = [ 'title', 'body', ]; protected $translatable = ['title']; } class NotTranslatableModel extends Model { protected $table = 'posts'; /** * The attributes that are mass assignable. * * @var array */ protected $fillable = [ 'title', 'body', ]; } class StillNotTranslatableModel extends Model { protected $table = 'posts'; /** * The attributes that are mass assignable. * * @var array */ protected $fillable = [ 'title', 'body', ]; protected $translatable = ['title']; } class ActuallyTranslatableModel extends Model { protected $table = 'posts'; use Translatable; /** * The attributes that are mass assignable. * * @var array */ protected $fillable = [ 'title', 'body', ]; }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/tests/TestCase.php
tests/TestCase.php
<?php namespace TCG\Voyager\Tests; use Illuminate\Contracts\Debug\ExceptionHandler; use Orchestra\Testbench\BrowserKit\TestCase as OrchestraTestCase; use TCG\Voyager\Models\User; use TCG\Voyager\VoyagerServiceProvider; class TestCase extends OrchestraTestCase { protected $withDummy = true; public function setUp(): void { parent::setUp(); $this->loadLaravelMigrations(); if (!is_dir(base_path('routes'))) { mkdir(base_path('routes')); } if (!file_exists(base_path('routes/web.php'))) { file_put_contents( base_path('routes/web.php'), "<?php Route::get('/', function () {return view('welcome');});" ); } // Orchestra Testbench does not contain this file and can't create autoload without if (!is_dir(base_path('tests/'))) { mkdir(base_path('tests/')); file_put_contents( base_path('tests/TestCase.php'), "<?php\n\n" ); } $this->app->make('Illuminate\Contracts\Http\Kernel')->pushMiddleware('Illuminate\Session\Middleware\StartSession'); $this->app->make('Illuminate\Contracts\Http\Kernel')->pushMiddleware('Illuminate\View\Middleware\ShareErrorsFromSession'); $this->install(); } protected function getPackageProviders($app) { return [ VoyagerServiceProvider::class, ]; } public function tearDown(): void { //parent::tearDown(); //$this->artisan('migrate:reset'); } /** * Define environment setup. * * @param \Illuminate\Foundation\Application $app * * @return void */ protected function getEnvironmentSetUp($app) { // Setup default database to use sqlite :memory: $app['config']->set('database.default', 'testbench'); $app['config']->set('database.connections.testbench', [ 'driver' => 'sqlite', 'database' => ':memory:', 'prefix' => '', ]); // Setup Voyager configuration $app['config']->set('voyager.user.namespace', User::class); // Setup Authentication configuration $app['config']->set('auth.providers.users.model', User::class); } protected function install() { $this->artisan('voyager:install', ['--with-dummy' => $this->withDummy]); app(VoyagerServiceProvider::class, ['app' => $this->app])->loadAuth(); if (file_exists(base_path('routes/web.php'))) { require base_path('routes/web.php'); } } public function disableExceptionHandling() { $this->app->instance(ExceptionHandler::class, new DisabledTestException()); } /** * Visit the given URI with a GET request. * * @param string $uri * * @return $this */ public function visit($uri) { if (is_callable('parent::visit')) { return parent::visit($uri); } return $this->get($uri); } /** * Assert that a given string is seen on the current HTML. * * @param string $text * @param bool $negate * * @return $this */ public function see($text, $negate = false) { if (is_callable('parent::see')) { return parent::see($text); } if ($negate) { return $this->assertDontSee($text); } return $this->assertSee($text); } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/tests/ViewEventTest.php
tests/ViewEventTest.php
<?php namespace TCG\Voyager\Tests; use TCG\Voyager\Facades\Voyager; class ViewEventTest extends TestCase { public $eventTrigered = false; public function setUp(): void { parent::setUp(); $this->disableExceptionHandling(); // Add test view app('view')->addLocation(__DIR__.'/views'); // Add test route $this->app['router']->get('test', function () { return Voyager::view('test', [ 'foo' => 'bar', ]); }); } public function testRenderingViewTriggersEvent() { // Load view, and test if view works $this->get('test') ->see('This is a test'); // Add event on test view Voyager::onLoadingView('test', function ($name, array $parameters) { $this->eventTrigered = true; $this->assertEquals('test', $name); $this->assertArrayHasKey('foo', $parameters); $this->assertEquals('bar', $parameters['foo']); }); // Load view to trigger the event $this->get('test'); // Test if event is triggered $this->assertTrue($this->eventTrigered); } public function testOverwritingViewName() { // Add event on test view Voyager::onLoadingView('test', function (&$name, array $parameters) { $name = 'foo'; }); // Load view to trigger the event, and see if the new view is used $this->get('test') ->see('This is the foo view'); } public function testOverwritingViewNameAndParameters() { // Add event on test view Voyager::onLoadingView('test', function (&$name, array &$parameters) { $name = 'hello'; $parameters['name'] = 'Mark'; }); // Load view to trigger the event, and see if the new view is used $this->get('test') ->see('Hello Mark!'); } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/tests/MenuTest.php
tests/MenuTest.php
<?php namespace TCG\Voyager\Tests; use Illuminate\Support\Facades\Auth; use TCG\Voyager\Models\Menu; class MenuTest extends TestCase { public function setUp(): void { parent::setUp(); Auth::loginUsingId(1); } public function testCanRenameMenu() { $menu = Menu::where('name', '=', 'admin')->first(); $this->visitRoute('voyager.menus.edit', $menu->id) ->seeInField('name', $menu->name) ->type('new_admin', 'name') ->seeInElement('button', __('voyager::generic.save')) ->press(__('voyager::generic.save')) ->seePageIs(route('voyager.menus.index')) ->seeInDatabase('menus', [ 'id' => $menu->id, 'name' => 'new_admin', ]); } public function testCanDeleteMenuItem() { $menu = Menu::where('name', '=', 'admin')->first(); $this->delete(route('voyager.menus.item.destroy', [ 'menu' => $menu->id, 'id' => $menu->items->first()->id, ]))->notSeeInDatabase('menu_items', [ 'id' => $menu->items->first()->id, ]); } public function testCanAddMenuItem() { $menu = Menu::where('name', '=', 'admin')->first(); $this->post(route('voyager.menus.item.add', [ 'menu' => $menu->id, 'menu_id' => $menu->id, 'type' => 'url', 'color' => '#000000', 'title' => 'Title', 'url' => '#', 'target' => '_self', ]))->seeInDatabase('menu_items', [ 'menu_id' => $menu->id, 'title' => 'Title', ]); } public function testCanUpdateMenuItem() { $menu = Menu::where('name', '=', 'admin')->first(); $item = $menu->items->first(); $this->put(route('voyager.menus.item.update', [ 'id' => $item->id, 'menu' => $menu->id, 'type' => 'url', 'color' => '#000000', 'title' => 'New Title', 'url' => '#', 'target' => '_self', ]))->seeInDatabase('menu_items', [ 'menu_id' => $menu->id, 'id' => $item->id, 'title' => 'New Title', ]); } public function testCanOrderMenu() { $menu = Menu::where('name', '=', 'admin')->first(); $response = $this->post('http://localhost/admin/menus/1/order', ['order' => '[{"id":4},{"id":1},{"id":3},{"id":2},{"id":5,"children":[{"id":6},{"id":7},{"id":8},{"id":9},{"id":11}]},{"id":10},{"id":12}]']); $this->assertEquals(200, $response->response->status()); } public function testCanSeeMenuBuilder() { $menu = Menu::where('name', '=', 'admin')->first(); $response = $this->call('GET', route('voyager.menus.builder', ['menu' => $menu->id])); $this->assertEquals(200, $response->status()); } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/tests/LoginTest.php
tests/LoginTest.php
<?php namespace TCG\Voyager\Tests; use Illuminate\Support\Facades\Auth; class LoginTest extends TestCase { public function testSuccessfulLoginWithDefaultCredentials() { $this->visit(route('voyager.login')) ->type('admin@admin.com', 'email') ->type('password', 'password') ->press(__('voyager::generic.login')) ->seePageIs(route('voyager.dashboard')); } public function testShowAnErrorMessageWhenITryToLoginWithWrongCredentials() { session()->setPreviousUrl(route('voyager.login')); $this->visit(route('voyager.login')) ->type('john@Doe.com', 'email') ->type('pass', 'password') ->press(__('voyager::generic.login')) ->seePageIs(route('voyager.login')) ->see(__('auth.failed')) ->seeInField('email', 'john@Doe.com'); } public function testRedirectIfLoggedIn() { Auth::loginUsingId(1); $this->visit(route('voyager.login')) ->seePageIs(route('voyager.dashboard')); } public function testRedirectIfNotLoggedIn() { $this->visit(route('voyager.profile')) ->seePageIs(route('voyager.login')); } public function testCanLogout() { Auth::loginUsingId(1); $this->visit(route('voyager.dashboard')) ->press(__('voyager::generic.logout')) ->seePageIs(route('voyager.login')); } public function testGetsLockedOutAfterFiveAttempts() { session()->setPreviousUrl(route('voyager.login')); for ($i = 0; $i <= 5; $i++) { $t = $this->visit(route('voyager.login')) ->type('john@Doe.com', 'email') ->type('pass', 'password') ->press(__('voyager::generic.login')); } $t->see(__('auth.throttle', ['seconds' => 60])); } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/tests/RouteTest.php
tests/RouteTest.php
<?php namespace TCG\Voyager\Tests; class RouteTest extends TestCase { /** * A basic functional test example. * * @return void */ public function testGetRoutes() { $this->disableExceptionHandling(); $this->visit(route('voyager.login')); $this->type('admin@admin.com', 'email'); $this->type('password', 'password'); $this->press(__('voyager::generic.login')); $urls = [ route('voyager.dashboard'), route('voyager.media.index'), route('voyager.settings.index'), route('voyager.roles.index'), route('voyager.roles.create'), route('voyager.roles.show', 1), route('voyager.roles.edit', 1), route('voyager.users.index'), route('voyager.users.create'), route('voyager.users.show', 1), route('voyager.users.edit', 1), route('voyager.posts.index'), route('voyager.posts.create'), route('voyager.posts.show', 1), route('voyager.posts.edit', 1), route('voyager.pages.index'), route('voyager.pages.create'), route('voyager.pages.show', 1), route('voyager.pages.edit', 1), route('voyager.categories.index'), route('voyager.categories.create'), route('voyager.categories.show', 1), route('voyager.categories.edit', 1), route('voyager.menus.index'), route('voyager.menus.create'), route('voyager.menus.show', 1), route('voyager.menus.edit', 1), route('voyager.database.index'), route('voyager.bread.edit', 'categories'), route('voyager.database.edit', 'categories'), route('voyager.database.create'), ]; foreach ($urls as $url) { $response = $this->call('GET', $url); $this->assertEquals(200, $response->status(), $url.' did not return a 200'); } } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/tests/AssetsTest.php
tests/AssetsTest.php
<?php namespace TCG\Voyager\Tests; use Illuminate\Support\Facades\Auth; class AssetsTest extends TestCase { protected $prefix = '/voyager-assets?path='; public function setUp(): void { parent::setUp(); Auth::loginUsingId(1); } public function testCanOpenFileInAssets() { $url = route('voyager.dashboard').$this->prefix.'css/app.css'; $response = $this->call('GET', $url); $this->assertEquals(200, $response->status(), $url.' did not return a 200'); } public static function urlProvider() { return [ [ '../dummy_content/pages/page1.jpg', '..../dummy_content/pages/page1.jpg', 'images/../../dummy_content/pages/page1.jpg', '....//dummy_content/pages/page1.jpg', '..\dummy_content/pages/page1.jpg', '....\dummy_content/pages/page1.jpg', 'images/..\..\dummy_content/pages/page1.jpg', 'images/....\\....\\dummy_content/pages/page1.jpg', ], ]; } /** * @dataProvider urlProvider */ public function testCannotOpenFileOutsideAssets($url) { $response = $this->call('GET', route('voyager.dashboard').$this->prefix.$url); $this->assertContains($response->status(), [404, 500], $url.' did not return a 404 or 500'); } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/tests/bootstrap.php
tests/bootstrap.php
<?php /* |-------------------------------------------------------------------------- | Register The Composer Auto Loader |-------------------------------------------------------------------------- | | Composer provides a convenient, automatically generated class loader | for our application. We just need to utilize it! We'll require it | into the script here so that we do not have to worry about the | loading of any our classes "manually". Feels great to relax. | */ require __DIR__.'/../vendor/autoload.php'; use Carbon\Carbon; /* |-------------------------------------------------------------------------- | Set The Default Timezone |-------------------------------------------------------------------------- | | Here we will set the default timezone for PHP. PHP is notoriously mean | if the timezone is not explicitly set. This will be used by each of | the PHP date and date-time functions throughout the application. | */ date_default_timezone_set('UTC'); Carbon::setTestNow(Carbon::now());
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/tests/UserProfileTest.php
tests/UserProfileTest.php
<?php namespace TCG\Voyager\Tests; use Illuminate\Foundation\Testing\DatabaseTransactions; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Hash; use TCG\Voyager\Models\Role; use TCG\Voyager\Models\User; class UserProfileTest extends TestCase { use DatabaseTransactions; protected $user; protected $editPageForTheCurrentUser; protected $listOfUsers; public function setUp(): void { parent::setUp(); $this->user = Auth::loginUsingId(1); $this->editPageForTheCurrentUser = route('voyager.users.edit', [$this->user->id]); $this->listOfUsers = route('voyager.users.index'); } public function testCanSeeTheUserInfoOnHisProfilePage() { $this->visit(route('voyager.profile')) ->seeInElement('h4', $this->user->name) ->seeInElement('.user-email', $this->user->email) ->seeLink(__('voyager::profile.edit')); } public function testCanEditUserName() { $this->visit(route('voyager.profile')) ->click(__('voyager::profile.edit')) ->see(__('voyager::profile.edit_user')) ->seePageIs($this->editPageForTheCurrentUser) ->type('New Awesome Name', 'name') ->press(__('voyager::generic.save')) ->seePageIs($this->listOfUsers) ->seeInDatabase( 'users', ['name' => 'New Awesome Name'] ); } public function testCanEditUserEmail() { $this->visit(route('voyager.profile')) ->click(__('voyager::profile.edit')) ->see(__('voyager::profile.edit_user')) ->seePageIs($this->editPageForTheCurrentUser) ->type('another@email.com', 'email') ->press(__('voyager::generic.save')) ->seePageIs($this->listOfUsers) ->seeInDatabase( 'users', ['email' => 'another@email.com'] ); } public function testCanEditUserPassword() { $this->visit(route('voyager.profile')) ->click(__('voyager::profile.edit')) ->see(__('voyager::profile.edit_user')) ->seePageIs($this->editPageForTheCurrentUser) ->type('voyager-rocks', 'password') ->press(__('voyager::generic.save')) ->seePageIs($this->listOfUsers); $updatedPassword = DB::table('users')->where('id', 1)->first()->password; $this->assertTrue(Hash::check('voyager-rocks', $updatedPassword)); } public function testCanEditUserAvatar() { $this->visit(route('voyager.profile')) ->click(__('voyager::profile.edit')) ->see(__('voyager::profile.edit_user')) ->seePageIs($this->editPageForTheCurrentUser) ->attach($this->newImagePath(), 'avatar') ->press(__('voyager::generic.save')) ->seePageIs($this->listOfUsers) ->dontSeeInDatabase( 'users', ['id' => 1, 'avatar' => 'user/default.png'] ); } public function testCanEditUserEmailWithEditorPermissions() { $user = \TCG\Voyager\Models\User::factory()->for(\TCG\Voyager\Models\Role::factory())->create(); $editPageForTheCurrentUser = route('voyager.users.edit', [$user->id]); // add permissions which reflect a possible editor role // without permissions to edit users $user->role->permissions()->attach(\TCG\Voyager\Models\Permission::whereIn('key', [ 'browse_admin', 'browse_users', ])->get()->pluck('id')->all()); Auth::onceUsingId($user->id); $this->visit(route('voyager.profile')) ->click(__('voyager::profile.edit')) ->see(__('voyager::profile.edit_user')) ->seePageIs($editPageForTheCurrentUser) ->type('another@email.com', 'email') ->press(__('voyager::generic.save')) ->seePageIs($this->listOfUsers) ->seeInDatabase( 'users', ['email' => 'another@email.com'] ); } public function testCanSetUserLocale() { $this->visit(route('voyager.profile')) ->click(__('voyager::profile.edit')) ->see(__('voyager::profile.edit_user')) ->seePageIs($this->editPageForTheCurrentUser) ->select('de', 'locale') ->press(__('voyager::generic.save')); $user = User::find(1); $this->assertTrue(($user->locale == 'de')); // Validate that app()->setLocale() is called Auth::loginUsingId($user->id); $this->visitRoute('voyager.dashboard'); $this->assertTrue(($user->locale == $this->app->getLocale())); } public function testRedirectBackAfterEditWithoutBrowsePermission() { $user = User::find(1); // Remove `browse_users` permission $user->role->permissions()->detach( $user->role->permissions()->where('key', 'browse_users')->first() ); $this->visit($this->editPageForTheCurrentUser) ->press(__('voyager::generic.save')) ->seePageIs($this->editPageForTheCurrentUser); } protected function newImagePath() { return realpath(__DIR__.'/temp/new_avatar.png'); } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/tests/DatabaseTest.php
tests/DatabaseTest.php
<?php namespace TCG\Voyager\Tests; use Doctrine\DBAL\Schema\SchemaException; use Illuminate\Support\Facades\Auth; use TCG\Voyager\Database\Schema\SchemaManager; use TCG\Voyager\Database\Schema\Table; use TCG\Voyager\Database\Types\Type; use TCG\Voyager\Traits\AlertsMessages; class DatabaseTest extends TestCase { use AlertsMessages; protected $table; public function setUp(): void { parent::setUp(); // todo: make sure tests are isolated and do not effect other ones // todo: interract with Table object directly instead of array? // todo: maybe perform the updates using one call to update_table? Type::registerCustomPlatformTypes(true); Auth::loginUsingId(1); // Prepare table $newTable = new Table('test_table_new'); $newTable->addColumn('id', 'integer', [ 'autoincrement' => true, ]); $newTable->addColumn('details', 'json', [ 'notnull' => true, ]); $newTable->setPrimaryKey(['id'], 'primary'); $this->table = $newTable->toArray(); // Create table $this->post(route('voyager.database.store'), [ 'table' => json_encode($this->table), ]); } public function test_table_created_successfully() { // Test correct response $this->assertSessionHasAll($this->alertSuccess(__('voyager::database.success_create_table', ['table' => $this->table['name']]))); $this->assertRedirectedToRoute('voyager.database.index'); // Test table exists $this->assertTrue(SchemaManager::tableExists($this->table['name'])); // Test database table details to be correct $dbTable = SchemaManager::listTableDetails($this->table['name']); $id = $dbTable->getColumn('id'); $details = $dbTable->getColumn('details'); // Column Type $this->assertEquals('integer', $id->getType()->getName()); $this->assertEquals('json', $details->getType()->getName()); // Column auto increment $this->assertTrue($id->getAutoIncrement()); // Column not null $this->assertTrue($details->getNotnull()); // Test Index $primary = $dbTable->getPrimaryKey(); $this->assertEquals('primary', $primary->getName()); // Test creating a table that already exists $this->expectExceptionMessage("table {$this->table['name']} already exists"); SchemaManager::createTable($this->table); } /* Table Update tests */ public function test_can_update_table() { $this->update_table_that_not_exist(); $this->can_add_column(); $this->can_change_column_type(); $this->can_change_column_options(); $this->can_add_index(); $this->can_rename_column(); $this->can_drop_column(); $this->can_rename_table(); } public function test_can_drop_table() { $this->assertTrue(SchemaManager::tableExists($this->table['name'])); $this->delete(route('voyager.database.destroy', $this->table['name'])); // Test correct response $this->assertSessionHasAll($this->alertSuccess(__('voyager::database.success_delete_table', ['table' => $this->table['name']]))); $this->assertRedirectedToRoute('voyager.database.index'); $this->assertFalse(SchemaManager::tableExists($this->table['name'])); } protected function update_table_that_not_exist() { $table = (new Table('i_dont_exist_please_create_me_first'))->toArray(); $this->put(route('voyager.database.update', $table['oldName']), [ 'table' => json_encode($table), ]); $this->assertSessionHasAll( $this->alertException(SchemaException::tableDoesNotExist($table['name'])) ); } protected function can_rename_table() { $this->table['name'] = 'table_new_name_test'; $this->update_table($this->table); $this->assertFalse(SchemaManager::tableExists($this->table['oldName'])); $this->assertTrue(SchemaManager::tableExists($this->table['name'])); } protected function can_add_column() { $dbTable = SchemaManager::listTableDetails($this->table['name']); $column = 'new_voyager_column'; $dbTable->addColumn($column, 'text', [ 'notnull' => false, ]); $dbTable = $this->update_table($dbTable->toArray()); $this->assertTrue($dbTable->hasColumn($column)); $this->assertEquals('text', $dbTable->getColumn($column)->getType()->getName()); } protected function can_rename_column() { $column = 1; $oldColumn = $this->table['columns'][$column]['oldName']; $newColumn = 'details_renamed_test'; $this->table['columns'][$column]['name'] = $newColumn; $dbTable = $this->update_table($this->table); $this->assertFalse($dbTable->hasColumn($oldColumn)); $this->assertTrue($dbTable->hasColumn($newColumn)); } protected function can_change_column_type() { $column = 1; $columnName = $this->table['columns'][$column]['name']; $newType = 'text'; $oldType = $this->table['columns'][$column]['type']['name']; $this->assertNotEquals($oldType, $newType); $this->table['columns'][$column]['type']['name'] = $newType; $dbTable = $this->update_table($this->table); $this->assertEquals($newType, $dbTable->getColumn($columnName)->getType()->getName()); } protected function can_change_column_options() { $column = 1; $columnName = $this->table['columns'][$column]['name']; $notnull = false; $default = 'voyager admin'; $this->table['columns'][$column]['notnull'] = $notnull; $this->table['columns'][$column]['default'] = $default; $dbTable = $this->update_table($this->table); $column = $dbTable->getColumn($columnName); $this->assertEquals($notnull, $column->getNotnull()); $this->assertEquals($default, $column->getDefault()); } protected function can_drop_column() { $column = 1; $columnName = $this->table['columns'][$column]['name']; $dbTable = SchemaManager::listTableDetails($this->table['name']); $this->assertTrue($dbTable->hasColumn($columnName)); unset($this->table['columns'][$column]); $dbTable = $this->update_table($this->table); $this->assertFalse($dbTable->hasColumn($columnName)); } protected function can_add_index() { $dbTable = SchemaManager::listTableDetails($this->table['name']); $indexName = 'details_unique'; $dbTable->addUniqueIndex(['details'], $indexName); $dbTable = $this->update_table($dbTable->toArray()); $this->assertTrue($dbTable->hasIndex($indexName)); $this->assertTrue($dbTable->getIndex($indexName)->isUnique()); } protected function update_table(array $table) { // Update table $this->put(route('voyager.database.update', $table['oldName']), [ 'table' => json_encode($table), ]); // Test correct response $this->assertSessionHasAll($this->alertSuccess(__('voyager::database.success_create_table', ['table' => $table['name']]))); $this->assertRedirectedToRoute('voyager.database.index'); return SchemaManager::listTableDetails($table['name']); } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/tests/SearchTest.php
tests/SearchTest.php
<?php namespace TCG\Voyager\Tests; use Illuminate\Foundation\Testing\DatabaseTransactions; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Route; use TCG\Voyager\Http\Controllers\VoyagerBaseController; use TCG\Voyager\Models\DataRow; use TCG\Voyager\Models\DataType; use TCG\Voyager\Models\Post; use TCG\Voyager\Models\User; class SearchTest extends TestCase { use DatabaseTransactions; protected $user; public function setUp(): void { parent::setUp(); $this->user = Auth::loginUsingId(1); } public function testCanSearchEquals0() { $post = Post::where('featured', 0)->first(); $post->featured = 1; $post->save(); $params = [ 'key' => 'featured', 'filter' => 'equals', 's' => '0', ]; $this->visit(route('voyager.posts.index').'?'.http_build_query($params)) ->dontSee($post->title) ->see(Post::where('featured', 0)->first()->title); $params['s'] = 1; $this->visit(route('voyager.posts.index').'?'.http_build_query($params)) ->see($post->title) ->dontSee(Post::where('featured', 0)->first()->title); } /*public function testCanSearchByBelongstoRelationship() { $this->setupAuthorRelationship(); $user = User::all()->first(); $post = Post::all()->first(); $post->author_id = $user->id; $post->save(); $params = [ 'key' => 'author_id', 'filter' => 'contains', 's' => substr($user->name, 0, 2), ]; $response = $this->fakeVisit('voyager.posts.index', 'GET', $params); $this->assertCount(1, $response->dataTypeContent); $this->assertEquals($post->id, $response->dataTypeContent->first()->id); $params['s'] = 'random'; $response = $this->fakeVisit('voyager.posts.index', 'GET', $params); $this->assertCount(0, $response->dataTypeContent); } public function testCanOrderAndSearchByBelongstoRelationship() { $this->setupAuthorRelationship(); $posts = Post::all(); $user = User::all()->first(); $post = $posts->first(); $post->author_id = $user->id; $post->save(); $other_user = factory(User::class)->create(['name' => 'Admin 2']); $other_post = $posts->last(); $other_post->author_id = $other_user->id; $other_post->save(); $params = [ 'key' => 'author_id', 'filter' => 'contains', 's' => substr($user->name, 0, 2), 'sort_order' => 'asc', 'order_by' => 'post_belongsto_user_relationship' ]; $response = $this->fakeVisit('voyager.posts.index', 'GET', $params); $this->assertCount(2, $response->dataTypeContent); $this->assertEquals($post->id, $response->dataTypeContent[0]->id); $this->assertEquals($other_post->id, $response->dataTypeContent[1]->id); $params['sort_order'] = 'desc'; $response = $this->fakeVisit('voyager.posts.index', 'GET', $params); $this->assertCount(2, $response->dataTypeContent); $this->assertEquals($other_post->id, $response->dataTypeContent[0]->id); $this->assertEquals($post->id, $response->dataTypeContent[1]->id); } protected function fakeVisit($route, $method = 'GET', $params = []) { $request = Request::create(route($route), $method, $params); $request->setRouteResolver(function() use ($route) { $stub = $this->getMockBuilder(Route::class) ->addMethods(['getName']) ->getMock(); $stub->method('getName')->willReturn($route); return $stub; }); return (new VoyagerBaseController())->index($request); } protected function setupAuthorRelationship() { DataRow::create([ 'data_type_id' => DataType::where('slug', 'posts')->first()->id, 'field' => 'post_belongsto_user_relationship', 'type' => 'relationship', 'display_name' => 'Author', 'details' => [ 'model' => 'TCG\Voyager\Models\User', 'table' => 'users', 'type' => 'belongsTo', 'column' => 'author_id', 'key' => 'id', 'label' => 'name', ], ]); }*/ }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/tests/SettingsTest.php
tests/SettingsTest.php
<?php namespace TCG\Voyager\Tests; use Illuminate\Support\Facades\Auth; use TCG\Voyager\Models\Setting; class SettingsTest extends TestCase { protected $user; public function setUp(): void { parent::setUp(); $this->user = Auth::loginUsingId(1); session()->setPreviousUrl(route('voyager.settings.index')); } public function testCanUpdateSettings() { $key = 'site.title'; $newTitle = 'Just Another LaravelVoyager.com Site'; $this->visit(route('voyager.settings.index')) ->seeInField($key, Setting::where('key', '=', $key)->first()->value) ->type($newTitle, $key) ->seeInElement('button', __('voyager::settings.save')) ->press(__('voyager::settings.save')) ->seePageIs(route('voyager.settings.index')) ->seeInDatabase('settings', [ 'key' => $key, 'value' => $newTitle, ]); } public function testCanCreateSetting() { $this->visitRoute('voyager.settings.index') ->type('New Setting', 'display_name') ->type('new_setting', 'key') ->select('text', 'type') ->select('Site', 'group') ->press(__('voyager::settings.add_new')) ->seePageIs(route('voyager.settings.index')) ->seeInDatabase('settings', [ 'display_name' => 'New Setting', 'key' => 'site.new_setting', 'type' => 'text', 'group' => 'Site', ]); } public function testCanDeleteSetting() { $setting = Setting::firstOrFail(); $this->call('DELETE', route('voyager.settings.delete', $setting->id)); $this->notSeeInDatabase('settings', [ 'id' => $setting->id, ]); } public function testCanDeleteSettingsValue() { $setting = Setting::firstOrFail(); $this->assertFalse(Setting::find($setting->id)->value == null); $this->call('PUT', route('voyager.settings.delete_value', $setting->id)); $this->seeInDatabase('settings', [ 'id' => $setting->id, 'value' => '', ]); } public function testCanMoveSettingUp() { $setting = Setting::where('order', '!=', 1)->first(); $this->call('GET', route('voyager.settings.move_up', $setting->id)); $this->seeInDatabase('settings', [ 'id' => $setting->id, 'order' => ($setting->order - 1), ]); } public function testCanMoveSettingDown() { $setting = Setting::where('order', '!=', 1)->first(); $this->call('GET', route('voyager.settings.move_down', $setting->id)); $this->seeInDatabase('settings', [ 'id' => $setting->id, 'order' => ($setting->order + 1), ]); } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/tests/PermissionTest.php
tests/PermissionTest.php
<?php namespace TCG\Voyager\Tests; use Illuminate\Support\Facades\Auth; use TCG\Voyager\Models\Permission; use TCG\Voyager\Models\Role; class PermissionTest extends TestCase { protected $user; public function setUp(): void { parent::setUp(); Auth::loginUsingId(1); $this->user = Auth::user(); } public function testNotHavingPermission() { Permission::create(['key' => 'test']); $this->assertFalse($this->user->hasPermission('test')); } public function testHavingPermission() { $role = Role::find(1) ->permissions() ->create(['key' => 'test']); $this->assertTrue($this->user->hasPermission('test')); } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/tests/Feature/SeederTest.php
tests/Feature/SeederTest.php
<?php namespace TCG\Voyager\Tests\Feature; use TCG\Voyager\Tests\TestCase; class SeederTest extends TestCase { public function setUp(): void { parent::setUp(); $this->install(); } /** * Test manually seeding is working. */ public function testVoyagerDatabaseSeederCanBeCalled() { $exception = null; try { $this->artisan('db:seed', ['--class' => 'VoyagerDatabaseSeeder']); } catch (\Exception $exception) { } $this->assertNull($exception, 'An exception was thrown'); } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/tests/Feature/DashboardTest.php
tests/Feature/DashboardTest.php
<?php namespace TCG\Voyager\Tests\Feature; use Illuminate\Support\Facades\Auth; use TCG\Voyager\Facades\Voyager; use TCG\Voyager\Tests\TestCase; class DashboardTest extends TestCase { public function setUp(): void { parent::setUp(); $this->install(); } /** * Test Dashboard Widgets. * * This test will make sure the configured widgets are being shown on * the dashboard page. */ public function testWidgetsAreBeingShownOnDashboardPage() { // We must first login and visit the dashboard page. Auth::loginUsingId(1); $this->visit(route('voyager.dashboard')) ->see(__('voyager::generic.dashboard')); // Test UserDimmer widget $this->see(trans_choice('voyager::dimmer.user', 1)) ->click(__('voyager::dimmer.user_link_text')) ->seePageIs(route('voyager.users.index')) ->click(__('voyager::generic.dashboard')) ->seePageIs(route('voyager.dashboard')); // Test PostDimmer widget $this->see(trans_choice('voyager::dimmer.post', 4)) ->click(__('voyager::dimmer.post_link_text')) ->seePageIs(route('voyager.posts.index')) ->click(__('voyager::generic.dashboard')) ->seePageIs(route('voyager.dashboard')); // Test PageDimmer widget $this->see(trans_choice('voyager::dimmer.page', 1)) ->click(__('voyager::dimmer.page_link_text')) ->seePageIs(route('voyager.pages.index')) ->click(__('voyager::generic.dashboard')) ->seePageIs(route('voyager.dashboard')) ->see(__('voyager::generic.dashboard')); } /** * UserDimmer widget isn't displayed without the right permissions. */ public function testUserDimmerWidgetIsNotShownWithoutTheRightPermissions() { // We must first login and visit the dashboard page. $user = \Auth::loginUsingId(1); // Remove `browse_users` permission $user->role->permissions()->detach( $user->role->permissions()->where('key', 'browse_users')->first() ); $this->visit(route('voyager.dashboard')) ->see(__('voyager::generic.dashboard')); // Test UserDimmer widget $this->dontSee('<h4>1 '.trans_choice('voyager::dimmer.user', 1).'</h4>') ->dontSee(__('voyager::dimmer.user_link_text')); } /** * PostDimmer widget isn't displayed without the right permissions. */ public function testPostDimmerWidgetIsNotShownWithoutTheRightPermissions() { // We must first login and visit the dashboard page. $user = \Auth::loginUsingId(1); // Remove `browse_users` permission $user->role->permissions()->detach( $user->role->permissions()->where('key', 'browse_posts')->first() ); $this->visit(route('voyager.dashboard')) ->see(__('voyager::generic.dashboard')); // Test PostDimmer widget $this->dontSee('<h4>1 '.trans_choice('voyager::dimmer.post', 1).'</h4>') ->dontSee(__('voyager::dimmer.post_link_text')); } /** * PageDimmer widget isn't displayed without the right permissions. */ public function testPageDimmerWidgetIsNotShownWithoutTheRightPermissions() { // We must first login and visit the dashboard page. $user = \Auth::loginUsingId(1); // Remove `browse_users` permission $user->role->permissions()->detach( $user->role->permissions()->where('key', 'browse_pages')->first() ); $this->visit(route('voyager.dashboard')) ->see(__('voyager::generic.dashboard')); // Test PageDimmer widget $this->dontSee('<h4>1 '.trans_choice('voyager::dimmer.page', 1).'</h4>') ->dontSee(__('voyager::dimmer.page_link_text')); } /** * Test See Correct Footer Version Number. * * This test will make sure the footer contains the correct version number. */ public function testSeeingCorrectFooterVersionNumber() { // We must first login and visit the dashboard page. Auth::loginUsingId(1); $this->visit(route('voyager.dashboard')) ->see(Voyager::getVersion()); } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/tests/views/test.blade.php
tests/views/test.blade.php
This is a test
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/tests/views/foo.blade.php
tests/views/foo.blade.php
This is the foo view
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/tests/views/hello.blade.php
tests/views/hello.blade.php
Hello {{ $name }}!
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/tests/Unit/VoyagerTest.php
tests/Unit/VoyagerTest.php
<?php namespace TCG\Voyager\Tests\Unit; use Illuminate\Support\Facades\Config; use TCG\Voyager\Facades\Voyager; use TCG\Voyager\Tests\TestCase; class VoyagerTest extends TestCase { /** * Dimmers returns an array filled with widget collections. * * This test will make sure that the dimmers method will give us an array * of the collection of the configured widgets. */ public function testDimmersReturnsCollectionOfConfiguredWidgets() { Config::set('voyager.dashboard.widgets', [ 'TCG\\Voyager\\Tests\\Stubs\\Widgets\\AccessibleDimmer', 'TCG\\Voyager\\Tests\\Stubs\\Widgets\\AccessibleDimmer', ]); $dimmers = Voyager::dimmers(); $this->assertEquals(2, $dimmers[0]->count()); } /** * Dimmers returns an array filled with widget collections. * * This test will make sure that the dimmers method will give us a * collection of the configured widgets which also should be displayed. */ public function testDimmersReturnsCollectionOfConfiguredWidgetsWhichShouldBeDisplayed() { Config::set('voyager.dashboard.widgets', [ 'TCG\\Voyager\\Tests\\Stubs\\Widgets\\AccessibleDimmer', 'TCG\\Voyager\\Tests\\Stubs\\Widgets\\InAccessibleDimmer', 'TCG\\Voyager\\Tests\\Stubs\\Widgets\\InAccessibleDimmer', ]); $dimmers = Voyager::dimmers(); $this->assertEquals(1, $dimmers[0]->count()); } /** * Dimmers returns an array filled with widget collections. * * Tests that we build N / 3 (rounded up) widget collections where * N is the total amount of widgets set in configuration */ public function testCreateEnoughDimmerCollectionsToContainAllAvailableDimmers() { Config::set('voyager.dashboard.widgets', [ 'TCG\\Voyager\\Tests\\Stubs\\Widgets\\AccessibleDimmer', 'TCG\\Voyager\\Tests\\Stubs\\Widgets\\AccessibleDimmer', 'TCG\\Voyager\\Tests\\Stubs\\Widgets\\AccessibleDimmer', 'TCG\\Voyager\\Tests\\Stubs\\Widgets\\AccessibleDimmer', 'TCG\\Voyager\\Tests\\Stubs\\Widgets\\AccessibleDimmer', ]); $dimmers = Voyager::dimmers(); $this->assertEquals(2, count($dimmers)); $this->assertEquals(3, $dimmers[0]->count()); $this->assertEquals(2, $dimmers[1]->count()); } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/tests/Unit/Actions/AbstractActionTest.php
tests/Unit/Actions/AbstractActionTest.php
<?php namespace TCG\Voyager\Tests\Unit\Actions; use TCG\Voyager\Actions\AbstractAction; use TCG\Voyager\Facades\Voyager; use TCG\Voyager\Models\User; use TCG\Voyager\Tests\TestCase; class AbstractActionTest extends TestCase { /** * The users DataType instance. * * @var \TCG\Voyager\Models\DataType */ protected $userDataType; /** * A dummy user instance. * * @var \TCG\Voyager\Models\User */ protected $user; public function setUp(): void { parent::setUp(); $this->userDataType = Voyager::model('DataType')->where('name', 'users')->first(); $this->user = \TCG\Voyager\Models\User::factory()->create(); } /** * This test checks that `getRoute` method calls the `getDefaultRoute` * method if the given key is empty. */ public function testGetRouteWithEmptyKey() { $stub = $this->getMockBuilder(AbstractAction::class) ->disableOriginalConstructor() ->onlyMethods(['getDefaultRoute']) ->getMockForAbstractClass(); // The `getDefaultRoute` method is called as default inside the // `getRoute` method to retrieve the route. $stub->expects($this->any()) ->method('getDefaultRoute') ->will($this->returnValue(true)); $this->assertTrue($stub->getRoute($this->userDataType->name)); } /** * This test checks that `getRoute` method calls the expected method when a * key is given. */ public function testGetRouteWithCustomKey() { $stub = $this->getMockBuilder(AbstractAction::class) ->disableOriginalConstructor() ->addMethods(['getCustomRoute']) ->getMockForAbstractClass(); // The key that's passed to the `getRoute` method will be capitalized // and putted between 'get' and 'Route'. Calling `getRoute('custom')` // will call the `getCustomRoute` method if it's defined. $stub->expects($this->any()) ->method('getCustomRoute') ->will($this->returnValue(true)); $this->assertTrue($stub->getRoute('custom')); } /** * This test checks that `getAttributes` method will give us the expected * output. */ public function testConvertAttributesToHtml() { $stub = $this->getMockBuilder(AbstractAction::class) ->disableOriginalConstructor() ->onlyMethods(['getAttributes']) ->getMockForAbstractClass(); $stub->expects($this->any()) ->method('getAttributes') ->will($this->returnValue([ 'class' => 'class1 class2', 'data-id' => 5, 'id' => 'delete-5', ])); $this->assertEquals('class="class1 class2" data-id="5" id="delete-5"', $stub->convertAttributesToHtml()); } /** * This test checks that `shouldActionDisplayOnDataType` method returns true * if the action should be displayed for every data type. */ public function testShouldActionDisplayOnDataTypeWithDefaultDataType() { $stub = $this->getMockBuilder(AbstractAction::class) ->setConstructorArgs([$this->userDataType, $this->user]) ->getMockForAbstractClass(); $this->assertTrue($stub->shouldActionDisplayOnDataType()); } /** * This test checks that `shouldActionDisplayOnDataType` method returns true * if the action should only be displayed for a specific data type. */ public function testTrueIsReturnedIfDataTypeMatchesTheOneWhereTheActionWasCreatedFor() { $stub = $this->getMockBuilder(AbstractAction::class) ->setConstructorArgs([$this->userDataType, $this->user]) ->onlyMethods(['getDataType']) ->getMockForAbstractClass(); $stub->expects($this->any()) ->method('getDataType') ->will($this->returnValue($this->userDataType->name)); $this->assertTrue($stub->shouldActionDisplayOnDataType()); } /** * This test checks that `shouldActionDisplayOnDataType` method returns false * if the action should only be displayed for a specific data type. */ public function testFalseIsReturnedIfDataTypeDoesNotMatchesTheOneWhereTheActionWasCreatedFor() { $stub = $this->getMockBuilder(AbstractAction::class) ->setConstructorArgs([$this->userDataType, $this->user]) ->onlyMethods(['getDataType']) ->getMockForAbstractClass(); $stub->expects($this->any()) ->method('getDataType') ->will($this->returnValue('not users')); // different data type $this->assertFalse($stub->shouldActionDisplayOnDataType()); } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/tests/Models/PostTest.php
tests/Models/PostTest.php
<?php namespace TCG\Voyager\Tests; use Illuminate\Support\Facades\Auth; use TCG\Voyager\Models\Category; use TCG\Voyager\Models\Post; class PostTest extends TestCase { public function testCanCreateAPageWithLoggedInUserAutoAssigned() { $user = Auth::loginUsingId(1); $post = new Post(); $post->fill([ 'category_id' => Category::first()->id, 'slug' => 'test-slug', 'title' => 'Test Title', 'excerpt' => 'Test Excerpt', 'body' => 'Test Body', 'meta_description' => 'Test Description', 'meta_keywords' => 'Test Meta Keywords', ]); $post->save(); $this->assertEquals(1, $post->author_id); $this->assertEquals('test-slug', $post->slug); $this->assertEquals('Test Title', $post->title); $this->assertEquals('Test Excerpt', $post->excerpt); $this->assertEquals('Test Body', $post->body); $this->assertEquals('Test Description', $post->meta_description); $this->assertEquals('Test Meta Keywords', $post->meta_keywords); $this->assertEquals($post->authorId, Auth::user()); $this->assertEquals($post->category, Category::first()); $this->assertTrue($post->published() !== null); } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/tests/Models/CategoryTest.php
tests/Models/CategoryTest.php
<?php namespace TCG\Voyager\Tests; use Illuminate\Support\Facades\Auth; use TCG\Voyager\Models\Category; use TCG\Voyager\Models\Post; class CategoryTest extends TestCase { public function testCanCreateACategoryWithLoggedInUser() { $user = Auth::loginUsingId(1); $category = new Category(); $category->fill([ 'name' => 'Test Title', 'slug' => 'test-slug', ]); $category->save(); $this->assertEquals('test-slug', $category->slug); $this->assertEquals('Test Title', $category->name); } public function testHasPost() { $post = Post::first(); $post->category_id = Category::first()->id; $post->save(); $this->assertTrue($post->category !== null); $this->assertTrue($post->category->posts !== null); } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/tests/Models/PageTest.php
tests/Models/PageTest.php
<?php namespace TCG\Voyager\Tests; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Str; use TCG\Voyager\Models\Page; class PageTest extends TestCase { public function testCanCreateAPageWithLoggedInUserAutoAssigned() { $user = Auth::loginUsingId(1); $page = new Page(); $page->fill([ 'slug' => 'test-slug', 'title' => 'Test Title', 'excerpt' => 'Test Excerpt', 'body' => 'Test Body', 'meta_description' => 'Test Description', 'meta_keywords' => 'Test Meta Keywords', ]); $page->save(); $this->assertEquals(1, $page->author_id); $this->assertEquals('test-slug', $page->slug); $this->assertEquals('Test Title', $page->title); $this->assertEquals('Test Excerpt', $page->excerpt); $this->assertEquals('Test Body', $page->body); $this->assertEquals('Test Description', $page->meta_description); $this->assertEquals('Test Meta Keywords', $page->meta_keywords); } public function testActiveScopeReturnsOnlyPagesWithStatusEqualToActive() { Auth::loginUsingId(1); $data = [ 'title' => 'Test Title', 'excerpt' => 'Test Excerpt', 'body' => 'Test Body', 'meta_description' => 'Test Description', 'meta_keywords' => 'Test Meta Keywords', ]; $inactive = (new Page($data + ['slug' => Str::random(8), 'status' => Page::STATUS_INACTIVE])); $inactive->save(); $active = (new Page($data + ['slug' => Str::random(8), 'status' => Page::STATUS_ACTIVE])); $active->save(); $results = Page::active()->get()->toArray(); $this->assertContains($active->fresh()->toArray(), $results); $this->assertNotContains($inactive->fresh()->toArray(), $results); } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/tests/database/factories/RoleFactory.php
tests/database/factories/RoleFactory.php
<?php namespace TCG\Voyager\Tests\Database\Factories; use Illuminate\Database\Eloquent\Factories\Factory; class RoleFactory extends Factory { protected $model = \TCG\Voyager\Models\Role::class; public function definition() { $role = $this->faker->word(); return [ 'name' => strtolower($role), 'display_name' => ucfirst($role), ]; } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/tests/database/factories/UserFactory.php
tests/database/factories/UserFactory.php
<?php namespace TCG\Voyager\Tests\Database\Factories; use Illuminate\Database\Eloquent\Factories\Factory; use Illuminate\Support\Str; class UserFactory extends Factory { protected $model = \TCG\Voyager\Models\User::class; public function definition() { static $password; return [ 'name' => $this->faker->name(), 'email' => $this->faker->unique()->safeEmail(), 'password' => $password ?: $password = bcrypt('secret'), 'remember_token' => Str::random(10), ]; } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/tests/Stubs/Widgets/InAccessibleDimmer.php
tests/Stubs/Widgets/InAccessibleDimmer.php
<?php namespace TCG\Voyager\Tests\Stubs\Widgets; use Arrilot\Widgets\AbstractWidget; class InAccessibleDimmer extends AbstractWidget { /** * The configuration array. * * @var array */ protected $config = []; /** * Treat this method as a controller action. * Return view() or other content to display. */ public function run() { return view('voyager::dimmer', array_merge($this->config, [ 'icon' => '', 'title' => '', 'text' => '', 'button' => [ 'text' => '', 'link' => '', ], 'image' => '', ])); } /** * Determine if the widget should be displayed. * * @return bool */ public function shouldBeDisplayed() { return false; } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/tests/Stubs/Widgets/AccessibleDimmer.php
tests/Stubs/Widgets/AccessibleDimmer.php
<?php namespace TCG\Voyager\Tests\Stubs\Widgets; use Arrilot\Widgets\AbstractWidget; class AccessibleDimmer extends AbstractWidget { /** * The configuration array. * * @var array */ protected $config = []; /** * Treat this method as a controller action. * Return view() or other content to display. */ public function run() { return view('voyager::dimmer', array_merge($this->config, [ 'icon' => '', 'title' => '', 'text' => '', 'button' => [ 'text' => '', 'link' => '', ], 'image' => '', ])); } /** * Determine if the widget should be displayed. * * @return bool */ public function shouldBeDisplayed() { return true; } }
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/routes/voyager.php
routes/voyager.php
<?php use Illuminate\Support\Str; use TCG\Voyager\Events\Routing; use TCG\Voyager\Events\RoutingAdmin; use TCG\Voyager\Events\RoutingAdminAfter; use TCG\Voyager\Events\RoutingAfter; use TCG\Voyager\Facades\Voyager; /* |-------------------------------------------------------------------------- | Voyager Routes |-------------------------------------------------------------------------- | | This file is where you may override any of the routes that are included | with Voyager. | */ Route::group(['as' => 'voyager.'], function () { event(new Routing()); $namespacePrefix = '\\'.config('voyager.controllers.namespace').'\\'; Route::get('login', ['uses' => $namespacePrefix.'VoyagerAuthController@login', 'as' => 'login']); Route::post('login', ['uses' => $namespacePrefix.'VoyagerAuthController@postLogin', 'as' => 'postlogin']); Route::group(['middleware' => 'admin.user'], function () use ($namespacePrefix) { event(new RoutingAdmin()); // Main Admin and Logout Route Route::get('/', ['uses' => $namespacePrefix.'VoyagerController@index', 'as' => 'dashboard']); Route::post('logout', ['uses' => $namespacePrefix.'VoyagerController@logout', 'as' => 'logout']); Route::post('upload', ['uses' => $namespacePrefix.'VoyagerController@upload', 'as' => 'upload']); Route::get('profile', ['uses' => $namespacePrefix.'VoyagerUserController@profile', 'as' => 'profile']); try { foreach (Voyager::model('DataType')::all() as $dataType) { $breadController = $dataType->controller ? Str::start($dataType->controller, '\\') : $namespacePrefix.'VoyagerBaseController'; Route::get($dataType->slug.'/order', $breadController.'@order')->name($dataType->slug.'.order'); Route::post($dataType->slug.'/action', $breadController.'@action')->name($dataType->slug.'.action'); Route::post($dataType->slug.'/order', $breadController.'@update_order')->name($dataType->slug.'.update_order'); Route::get($dataType->slug.'/{id}/restore', $breadController.'@restore')->name($dataType->slug.'.restore'); Route::get($dataType->slug.'/relation', $breadController.'@relation')->name($dataType->slug.'.relation'); Route::post($dataType->slug.'/remove', $breadController.'@remove_media')->name($dataType->slug.'.media.remove'); Route::resource($dataType->slug, $breadController, ['parameters' => [$dataType->slug => 'id']]); } } catch (\InvalidArgumentException $e) { throw new \InvalidArgumentException("Custom routes hasn't been configured because: ".$e->getMessage(), 1); } catch (\Exception $e) { // do nothing, might just be because table not yet migrated. } // Menu Routes Route::group([ 'as' => 'menus.', 'prefix' => 'menus/{menu}', ], function () use ($namespacePrefix) { Route::get('builder', ['uses' => $namespacePrefix.'VoyagerMenuController@builder', 'as' => 'builder']); Route::post('order', ['uses' => $namespacePrefix.'VoyagerMenuController@order_item', 'as' => 'order_item']); Route::group([ 'as' => 'item.', 'prefix' => 'item', ], function () use ($namespacePrefix) { Route::delete('{id}', ['uses' => $namespacePrefix.'VoyagerMenuController@delete_menu', 'as' => 'destroy']); Route::post('/', ['uses' => $namespacePrefix.'VoyagerMenuController@add_item', 'as' => 'add']); Route::put('/', ['uses' => $namespacePrefix.'VoyagerMenuController@update_item', 'as' => 'update']); }); }); // Settings Route::group([ 'as' => 'settings.', 'prefix' => 'settings', ], function () use ($namespacePrefix) { Route::get('/', ['uses' => $namespacePrefix.'VoyagerSettingsController@index', 'as' => 'index']); Route::post('/', ['uses' => $namespacePrefix.'VoyagerSettingsController@store', 'as' => 'store']); Route::put('/', ['uses' => $namespacePrefix.'VoyagerSettingsController@update', 'as' => 'update']); Route::delete('{id}', ['uses' => $namespacePrefix.'VoyagerSettingsController@delete', 'as' => 'delete']); Route::get('{id}/move_up', ['uses' => $namespacePrefix.'VoyagerSettingsController@move_up', 'as' => 'move_up']); Route::get('{id}/move_down', ['uses' => $namespacePrefix.'VoyagerSettingsController@move_down', 'as' => 'move_down']); Route::put('{id}/delete_value', ['uses' => $namespacePrefix.'VoyagerSettingsController@delete_value', 'as' => 'delete_value']); }); // Admin Media Route::group([ 'as' => 'media.', 'prefix' => 'media', ], function () use ($namespacePrefix) { Route::get('/', ['uses' => $namespacePrefix.'VoyagerMediaController@index', 'as' => 'index']); Route::post('files', ['uses' => $namespacePrefix.'VoyagerMediaController@files', 'as' => 'files']); Route::post('new_folder', ['uses' => $namespacePrefix.'VoyagerMediaController@new_folder', 'as' => 'new_folder']); Route::post('delete_file_folder', ['uses' => $namespacePrefix.'VoyagerMediaController@delete', 'as' => 'delete']); Route::post('move_file', ['uses' => $namespacePrefix.'VoyagerMediaController@move', 'as' => 'move']); Route::post('rename_file', ['uses' => $namespacePrefix.'VoyagerMediaController@rename', 'as' => 'rename']); Route::post('upload', ['uses' => $namespacePrefix.'VoyagerMediaController@upload', 'as' => 'upload']); Route::post('crop', ['uses' => $namespacePrefix.'VoyagerMediaController@crop', 'as' => 'crop']); }); // BREAD Routes Route::group([ 'as' => 'bread.', 'prefix' => 'bread', ], function () use ($namespacePrefix) { Route::get('/', ['uses' => $namespacePrefix.'VoyagerBreadController@index', 'as' => 'index']); Route::get('{table}/create', ['uses' => $namespacePrefix.'VoyagerBreadController@create', 'as' => 'create']); Route::post('/', ['uses' => $namespacePrefix.'VoyagerBreadController@store', 'as' => 'store']); Route::get('{table}/edit', ['uses' => $namespacePrefix.'VoyagerBreadController@edit', 'as' => 'edit']); Route::put('{id}', ['uses' => $namespacePrefix.'VoyagerBreadController@update', 'as' => 'update']); Route::delete('{id}', ['uses' => $namespacePrefix.'VoyagerBreadController@destroy', 'as' => 'delete']); Route::post('relationship', ['uses' => $namespacePrefix.'VoyagerBreadController@addRelationship', 'as' => 'relationship']); Route::get('delete_relationship/{id}', ['uses' => $namespacePrefix.'VoyagerBreadController@deleteRelationship', 'as' => 'delete_relationship']); }); // Database Routes Route::resource('database', $namespacePrefix.'VoyagerDatabaseController'); // Compass Routes Route::group([ 'as' => 'compass.', 'prefix' => 'compass', ], function () use ($namespacePrefix) { Route::get('/', ['uses' => $namespacePrefix.'VoyagerCompassController@index', 'as' => 'index']); Route::post('/', ['uses' => $namespacePrefix.'VoyagerCompassController@index', 'as' => 'post']); }); event(new RoutingAdminAfter()); }); //Asset Routes Route::get('voyager-assets', ['uses' => $namespacePrefix.'VoyagerController@assets', 'as' => 'voyager_assets']); event(new RoutingAfter()); });
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/publishable/lang/km/analytics.php
publishable/lang/km/analytics.php
<?php return [ 'by_pageview' => 'ចំនួនមើលទំព័រ', 'by_sessions' => 'Sessions', 'by_users' => 'អ្នកប្រើប្រាស់', 'no_client_id' => 'ដើម្បីមើលការវិភាគ អ្នកនឹងត្រូវទទួលបានលេខសម្គាល់ម៉ាស៊ីនភ្ញៀវវិភាគ google ហើយបន្ថែមវាទៅក្នុងការកំណត់របស់អ្នកសម្រាប់សោ <code>google_analytics_client_id</code>។ សូមទៅរកពាក្យសម្គាល់នៅ Google developer console របស់អ្នកតាមរយ:៖', 'set_view' => 'ជ្រើសរើសប្រភេទបង្ហាញ', 'this_vs_last_week' => 'សប្តាហ៍នេះ និងសប្តាហ៍មុន', 'this_vs_last_year' => 'ឆ្នាំនេះ និងឆ្នាំមុន', 'top_browsers' => 'លំដាប់ខ្ពស់នៃប្រភេទរុករកទាំងដប់', 'top_countries' => 'លំដាប់ខ្ពស់នៃប្រទេសទាំងដប់', 'various_visualizations' => 'ការមើលឃើញផ្សេងៗគ្នា', ];
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/publishable/lang/km/generic.php
publishable/lang/km/generic.php
<?php return [ 'is_rtl' => 'false', 'action' => 'ប្រតិបតិ្តការ', 'actions' => 'ប្រតិបតិ្តការ', 'add' => 'បន្ថែម', 'add_folder' => 'បន្ថែមថតឯកសារ', 'add_new' => 'បន្ថែមថ្មី', 'all_done' => 'គ្រប់យា៉ងរួចរាល់', 'are_you_sure' => 'តើអ្នកប្រាកដទេ', 'are_you_sure_delete' => 'តើអ្នកប្រាកដទេថាចង់លុប', 'ascending' => 'លំដាប់កើនឡើង', 'auto_increment' => 'កើនឡើងស្វ័យប្រវត្តិ', 'bread' => 'ប្រ៊ដ', 'browse' => 'រុករក', 'builder' => 'អ្នកសាងសង់', 'bulk_delete' => 'លុបជាបណ្តុំ', 'bulk_delete_confirm' => 'បាទ/ចាស លុបវាចោល', 'bulk_delete_nothing' => 'លោកអ្នកមិនបានជ្រើសរើសទិន្នន័យសម្រាប់លុបនោះទេ', 'cancel' => 'បោះបង់', 'choose_type' => 'ជ្រើសរើសប្រភេទ', 'click_here' => 'ចុចទីនេះ', 'close' => 'បិទ', 'compass' => 'ត្រីវិស័យ', 'created_at' => 'កាលបរិច្ឆេទបង្កើត', 'custom' => 'ផ្ទាល់ខ្លួន', 'dashboard' => 'ផ្ទាំងទូទៅ', 'database' => 'មូលដ្ឋានទិន្នន័យ', 'default' => 'លំនាំដើម', 'delete' => 'លុប', 'delete_confirm' => 'បាទ/ចាស លុបវាចោល!', 'delete_question' => 'តើអ្នកប្រាកដទេថាចង់លុប', 'delete_this_confirm' => 'បាទ/ចាស លុបវាចោល!', 'descending' => 'លំដាប់ថយចុះ', 'deselect_all' => 'ដកការជ្រើសរើសទាំងអស់', 'download' => 'ទាញយក', 'drag_drop_info' => 'ចុចលើទំព័រនេះដើម្បីផ្លាស់ប្ដូរទិន្នន័យនៅទីនេះ', 'edit' => 'កែសម្រួល', 'email' => 'អ៊ីមែល', 'error_deleting' => 'មានកំហុសពេលលុបទិន្នន័យនេះ', 'error_restoring' => 'មានកំហុសពេលស្ដារទិន្នន័យនេះ', 'exception' => 'កំហុស', 'featured' => 'ដែលបានជ្រើសរើស', 'field_does_not_exist' => 'វាលមិនមានទេ', 'find_by_place' => 'ស្វែងរកតាមទីតាំង', 'home' => 'បើកគេហទំព័រ', 'how_to_use' => 'របៀបក្នុងការប្រើប្រាស់', 'index' => 'Index', 'internal_error' => 'កំហុសក្នុងការប្រើប្រាស់', 'items' => 'ទំនិញ', 'keep_sidebar_open' => 'រក្សាទុកបង្អួចបង្អូសនៅលើបង្អួង', 'key' => 'កូដ', 'last_modified' => 'កែប្រែចុងក្រោយ', 'latitude' => 'ទទឹង', 'length' => 'ប្រវែង', 'locale' => 'ភាសា', 'login' => 'ចូលប្រព័ន្ធ', 'logout' => 'ចាកចេញ', 'longitude' => 'បណ្តោយ', 'media' => 'មេឌៀ', 'menu_builder' => 'កម្មវិធីបង្កើតមតិ', 'mimetype_not_allowed' => 'មិនអនុញ្ញាតឱ្យប្រើប្រាស់ប្រភេទឯកសារនេះ', 'move' => 'ផ្លាស់ទី', 'name' => 'ឈ្មោះ', 'new' => 'ថ្មី', 'no' => 'ទេ', 'no_thanks' => 'ទេ អរគុណ', 'none' => 'គ្មាន', 'not_null' => 'មាន', 'no_results' => 'គ្មានលទ្ធផល', 'open' => 'បើក', 'options' => 'ជម្រើស', 'password' => 'ពាក្យសម្ងាត់', 'permissions' => 'សិទ្ធិ', 'profile' => 'គណនី', 'public_url' => 'Public URL', 'read' => 'អាន', 'rename' => 'ប្តូរឈ្មោះ', 'remember_me' => 'ចង់ចាំខ្ញុំ', 'required' => 'ចាំបាច់', 'return_to_list' => 'ត្រលប់ក្រោយទៅតារាង', 'route' => 'Route', 'save' => 'រក្សាទុក', 'search' => 'ស្វែងរក', 'select_all' => 'ជ្រើសរើសទាំងអស់', 'select_group' => 'ជ្រើសរើសក្រុមរបស់អ្នកឬមួយក្រុមដែលអ្នកចង់បង្ហាញ', 'settings' => 'ការកំណត់', 'showing_entries' => 'បង្ហាញជួរទី :from ដល់ទី :to ក្នុងចំណោម :all ជួរ|បង្ហាញជួរទី :from ដល់ទី :to ក្នុងចំណោម :all ជួរ', 'submit' => 'ដាក់ស្នើ', 'successfully_added_new' => 'បានបន្ថែមថ្មីដោយជោគជ័យ', 'successfully_deleted' => 'បានលុបដោយជោគជ័យ', 'successfully_restored' => 'បានស្ដារដោយជោគជ័យ', 'successfully_updated' => 'បានកែប្រែដោយជោគជ័យ', 'successfully_created' => 'បានបង្កើតដោយជោគជ័យ', 'sweet_success' => 'ជោគជ័យ', 'timestamp' => 'Timestamp', 'title' => 'ចំណងជើង', 'type' => 'ប្រភេទ', 'restore' => 'ស្ដារ', 'unsigned' => 'Unsigned', 'unstick_sidebar' => 'ដោះរបារចំហៀង', 'update' => 'កែប្រែ', 'update_failed' => 'កែប្រែបានបរាជ័យ', 'updated_order' => 'បានកែប្រែលំដាប់', 'upload' => 'ផ្ទុកឡើង', 'url' => 'URL', 'view' => 'ពិនិត្យមើល', 'viewing' => 'ពិនិត្យមើល', 'whoopsie' => 'អាហ្អាស', 'yes' => 'បាទ/ចាស', 'yes_please' => 'បាទ/ចាស អនុវត្តន៌', 'contains' => 'ផ្ទុក', ];
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/publishable/lang/km/theme.php
publishable/lang/km/theme.php
<?php return [ 'footer_copyright' => 'បង្កើតដោយ <i class="voyager-heart"></i> ', 'footer_copyright2' => 'ផលិតជាមួយ Rum និង Rum ច្រើនទៀត', ];
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/publishable/lang/km/dimmer.php
publishable/lang/km/dimmer.php
<?php return [ 'page' => 'ទំព័រ|ទំព័រ', 'page_link_text' => 'មើលទំព័រទាំងអស់', 'page_text' => 'លោកអ្នកមាន :count :string។ សូមចុចប៊ូតុងខាងក្រោមដើម្បីមើលទំព័រទាំងអស់។', 'post' => 'អត្តបទ|អត្តបទ', 'post_link_text' => 'មើលអត្តបទទាំងអស់', 'post_text' => 'លោកអ្នកមាន :count :string។ សូមចុចប៊ូតុងខាងក្រោមដើម្បីមើលអត្តបទទាំងអស់។', 'user' => 'អ្នកប្រើប្រាស់|អ្នកប្រើប្រាស់', 'user_link_text' => 'មើលអ្នកប្រើប្រាស់ទាំងអស់', 'user_text' => 'លោកអ្នកមាន :count :string។ សូមចុចប៊ូតុងខាងក្រោមដើម្បីមើលអ្នកប្រើប្រាស់ទាំងអស់។', ];
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/publishable/lang/km/seeders.php
publishable/lang/km/seeders.php
<?php return [ 'data_rows' => [ 'author' => 'អ្នកនិពន្ធ', 'avatar' => 'រូបតំណាង', 'body' => 'តួរសេចក្តី', 'category' => 'ប្រភេទ', 'created_at' => 'កាលបរិច្ទេទបង្កើត', 'display_name' => 'ឈ្មោះសម្រាប់បង្ហាញ', 'email' => 'អ៊ីម៉ែល', 'excerpt' => 'ការរាយរាប់', 'featured' => 'បានជ្រើសរើស', 'id' => 'ID', 'meta_description' => 'បរិយារបស់ Meta នៃទំព័រនេះ', 'meta_keywords' => 'ពាក្យគន្លឺះរបស់ Meta នៃទំព័រនេះ', 'name' => 'ឈ្មោះ', 'order' => 'លំដាប់', 'page_image' => 'រូបភាព', 'parent' => 'មេ', 'password' => 'ពាក្យសម្ងាត់', 'post_image' => 'រូបភាព', 'remember_token' => 'ចង់ចាំនៃចូលប្រព័ន្ធ', 'role' => 'តួនាទី', 'roles' => 'តួនាទី', 'seo_title' => 'ចំណងជើង SEO នៃទំព័រនេះ', 'slug' => 'Slug', 'status' => 'ស្ថានភាព', 'title' => 'ចំណងជើង', 'updated_at' => 'កាលបរិច្ឆេទកែសម្រួល', ], 'data_types' => [ 'category' => [ 'singular' => 'ប្រភេទ', 'plural' => 'ប្រភេទ', ], 'menu' => [ 'singular' => 'ម៉ឺនុយ', 'plural' => 'ម៉ឺនុយ', ], 'page' => [ 'singular' => 'ទំព័រ', 'plural' => 'ទំព័រ', ], 'post' => [ 'singular' => 'អត្តបទ', 'plural' => 'អត្តបទ', ], 'role' => [ 'singular' => 'តួនាទី', 'plural' => 'តួនាទី', ], 'user' => [ 'singular' => 'អ្នកប្រើប្រាស់', 'plural' => 'អ្នកប្រើប្រាស់', ], ], 'menu_items' => [ 'bread' => 'ប្រ៊ដ', 'categories' => 'ប្រភេទ', 'compass' => 'ត្រីវិស័យ', 'dashboard' => 'ផ្ទាំងទូទៅ', 'database' => 'មូលដ្ឋានទិន្នន័យ', 'media' => 'មេឌៀ', 'menu_builder' => 'បង្កើតម៉ឺនុយ', 'pages' => 'ទំព័រ', 'posts' => 'អត្តបទ', 'roles' => 'តួនាទី', 'settings' => 'ការកំណត់', 'tools' => 'ឧបការណ៌', 'users' => 'អ្នកប្រើប្រាស់', ], 'roles' => [ 'admin' => 'អ្នកអភិបាល', 'user' => 'អ្នកប្រើប្រាស់', ], 'settings' => [ 'admin' => [ 'background_image' => 'រូបភាពផ្ទះ', 'description' => 'ការពិពណ៌នាអ្នកអភិបាល', 'description_value' => 'សូមស្វាគមន៍មកកាន់ Voyager ។ អ្នកគ្រប់គ្រងដែលបាត់សម្រាប់ Laravel', 'google_analytics_client_id' => 'លេខសម្គាល់អតិថិជន Google Analytics (ប្រើសម្រាប់ផ្ទាំងគ្រប់គ្រងគ្រប់គ្រង)', 'icon_image' => 'រូបភាពតំណាង', 'loader' => 'រូបភាពកំពុងផ្ទុក', 'title' => 'ចំណងជើង', ], 'site' => [ 'description' => 'ការពីពណ៌នាស្ថាប័ន', 'google_analytics_tracking_id' => 'Google Analytics Tracking ID', 'logo' => 'យីហោ', 'title' => 'ចំណងជើងស្ថាប័ន', ], ], ];
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/publishable/lang/km/datatable.php
publishable/lang/km/datatable.php
<?php // DataTable translations from: https://github.com/DataTables/Plugins/tree/master/i18n return [ 'sEmptyTable' => 'មិនមានទិន្នន័យក្នុងតារាងនេះទេ', 'sInfo' => 'បង្ហាញជួរទី _START_ ដល់ទី _END_ ក្នុងចំណោម _TOTAL_ ជួរ', 'sInfoEmpty' => 'បង្ហាញជួរទី 0 ដល់ទី 0 ក្នុងចំណោម 0 ជួរ', 'sInfoFiltered' => '(បានចម្រាញ់ចេញពីទិន្នន័យសរុប _MAX_ ជួរ)', 'sInfoPostFix' => '', 'sInfoThousands' => ',', 'sLengthMenu' => 'បង្ហាញ _MENU_ ជួរ', 'sLoadingRecords' => 'កំពុងផ្ទុក...', 'sProcessing' => 'កំពុងដំណើរការ...', 'sSearch' => 'ស្វែងរក:', 'sZeroRecords' => 'មិនមានទិន្នន័យត្រូវតាមលក្ខខណ្ឌស្វែងរកទេ', 'oPaginate' => [ 'sFirst' => 'ដំបូងគេ', 'sLast' => 'ចុងក្រោយ', 'sNext' => 'បន្ទាប់', 'sPrevious' => 'ក្រោយ', ], 'oAria' => [ 'sSortAscending' => ': ចុចដើម្បីរៀបជួរឈរនេះតាមលំដាប់ឡើង', 'sSortDescending' => ': ចុចដើម្បីរៀបជួរឈរនេះតាមលំដាប់ចុះ', ], ];
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/publishable/lang/km/media.php
publishable/lang/km/media.php
<?php return [ 'add_new_folder' => 'បន្ថែមថតឯកសារថ្មី', 'audio_support' => 'កម្មវិធីរុករកមិនគាំទ្រទិន្នន័យសំឡេងទេ', 'create_new_folder' => 'បង្កើតថតឯកសារថ្មី', 'delete_folder_question' => 'ការលុបថតឯកសារវានិងត្រូវឯកសារទាំងអស់ដែលមាននៅក្នុងថតឯកសារនេះ', 'delete_question' => 'តើលោកអ្នកប្រាកដទេថាចង់លុបឯកសារទាំងនេះ?', 'destination_folder' => 'ថតឯកសារគោលដៅ', 'drag_drop_info' => 'អូស និងទម្លាក់ឯកសារ ឬចុចខាងក្រោមដើម្បីផ្ទុកឡើង', 'error_already_exists' => 'សូមអភ័យទោស មានឯកសារ/ថតឯកសារដែលមានឈ្មោះដែលមានស្រាប់នៅក្នុងថតនោះ', 'error_creating_dir' => 'សូមអភ័យទោសមានអ្វីមួយខុសប្រក្រតីក្នុងការបង្កើតថត សូមពិនិត្យមើលការអនុញ្ញាតរបស់អ្នក', 'error_deleting_file' => 'សូមអភ័យទោសមានអ្វីមួយខុសប្រក្រតីក្នុងការលុបឯកសារនេះ សូមពិនិត្យមើលការអនុញ្ញាតរបស់អ្នក', 'error_deleting_folder' => 'សូមអភ័យទោសមានអ្វីមួយខុសប្រក្រតីនៅពេលលុបថតនេះ សូមពិនិត្យមើលការអនុញ្ញាតរបស់អ្នក', 'error_may_exist' => 'ឯកសារ ឬ ថតឯកសារ អាចមានរួចហើយជាមួយឈ្មោះនោះ។ សូមជ្រើសរើសឈ្មោះផ្សេងទៀត ឬលុបឯកសារផ្សេងទៀត។', 'error_moving' => 'សូមអភ័យទោស ហាក់ដូចជាមានបញ្ហាក្នុងការផ្លាស់ទីឯកសារ/ថតឯកសារនោះ សូមប្រាកដថាអ្នកមានសិទ្ធិត្រឹមត្រូវ។', 'error_renaming_ext' => 'ផ្នែកបន្ថែមនៃឯកសារមិនអាចផ្លាស់ប្តូរបានទេ!', 'error_uploading' => 'អាប់ឡូតបរាជ័យ៖ កំហុសមិនស្គាល់បានកើតឡើង!', 'files' => '1 ឯកសារ|:count ឯកសារ', 'files_more' => 'បន្ថែម:countទៀត', 'file_does_not_exist' => 'ឯកសារមិនមានទេ។', 'file_removed' => 'ឯកសារត្រូវបានដកចេញ', 'files_selected' => 'បានជ្រើសរើសឯកសារ/ថតឯកសារ', 'folder_exists_already' => 'សូមអភ័យទោសដែលមានថតឯកសារនោះរួចហើយ សូមលុបថតនោះចេញប្រសិនបើអ្នកចង់បង្កើតវាឡើងវិញ', 'image_does_not_exist' => 'រូបភាពមិនមានទេ', 'image_removed' => 'រូបភាពត្រូវបានដកចេញ', 'library' => 'បណ្ណាល័យមេឌៀ', 'loading' => 'កំពុងទាញយកមេឌៀរបស់លោកអ្នក', 'max_files_select' => 'អ្នកអាចជ្រើសរើសឯកសារតែមួយប៉ុណ្ណោះ|អ្នកអាចជ្រើសរើសបានតែអតិបរមានៃ:countឯកសារ', 'min_files_select' => 'អ្នកត្រូវតែជ្រើសរើសឯកសារយ៉ាងហោចណាស់មួយ|អ្នកត្រូវតែជ្រើសរើសយ៉ាងហោចណាស់:countឯកសារ', 'move_file_folder' => 'ផ្លាស់ទីឯកសារ/ថតឯកសារ', 'new_file_folder' => 'បន្ថែមឯកសារ/ថតឯកសារថ្មី។', 'new_folder_name' => 'ឈ្មោះថតឯកសារថ្មី', 'no_files_here' => 'មិនមានឯកសារនៅឡើយ។', 'no_files_in_folder' => 'មិនមានឯកសារនៅថតនេះឡើយ។', 'nothing_selected' => 'មិនបានជ្រើសរើសឯកសារ ឬថតឯកសារទេ', 'rename_file_folder' => 'ប្តូរឈ្មោះឯកសារ/ថតឯកសារ', 'success_uploaded_file' => 'អាប់ឡូតឯកសារថ្មីដោយជោគជ័យ!', 'success_uploading' => 'បង្ហោះរូបភាពដោយជោគជ័យ!', 'success_moved' => 'បានផ្លាស់ទីឯកសារ/ថតដោយជោគជ័យ', 'success_renamed' => 'បានប្តូរឈ្មោះឯកសារ/ថតឯកសារដោយជោគជ័យ', 'uploading_wrong_type' => 'អាប់ឡូតបរាជ័យ៖ ទ្រង់ទ្រាយឯកសារមិនគាំទ្រ ឬវាធំពេកក្នុងការបង្ហោះ!', 'crop' => 'កាត់', 'crop_and_create' => 'កាត់ និងបង្កើតថ្មី', 'crop_override_confirm' => 'វានិងបង្កើតថ្មីពីលើវត្ថុចាស់។ តើអ្នកប្រាកដទេ?', 'crop_image' => 'កាត់រូបភាព', 'success_crop_image' => 'បានកាត់រូបភាពដោយជោគជ័យ', 'height' => 'កម្ពស់: ', 'title' => 'ចំណងជើង', 'type' => 'ប្រភេទ', 'size' => 'ទំហំ', 'public_url' => 'តំណរភ្ជាប់សាធារណៈ', 'last_modified' => 'កែប្រែចុងក្រោយ', 'browser_video_support' => 'កម្មវិធីរុករកតាមអ៊ីនធឺណិតរបស់អ្នកមិនគាំទ្រស្លាកវីដេអូទេ', 'browser_audio_support' => 'កម្មវិធីរុករកតាមអ៊ីនធឺណិតរបស់អ្នកមិនគាំទ្រធាតុអូឌីយ៉ូទេ។', 'width' => 'ទទឹង: ', 'add_all_selected' => 'បន្ថែមទាំងអស់ដែលបានជ្រើស', ];
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/publishable/lang/km/post.php
publishable/lang/km/post.php
<?php return [ 'additional_fields'=> 'ទម្រង់បញ្ជុលបន្ថែមព័ត៌មាន', 'category' => 'ប្រភេទអត្តបទ', 'content' => 'អត្តបទ', 'details' => 'សេចក្តីលំអិត', 'excerpt' => 'ដកស្រង់<small>ការពិពណ៌នាតូចនៃប្រកាសនេះ</small>', 'image' => 'រូបភាព', 'meta_description' => 'សេចក្តីសង្ខេបនៃ Meta', 'meta_keywords' => 'ពាក្យគន្លឺះនៃ Meta', 'new' => 'បន្ថែមអត្តបទថ្មី', 'seo_content' => 'មាតិកានៃ SEO', 'seo_title' => 'ចំណងជើងនៃ SEO', 'slug' => 'URL slug', 'status' => 'ស្ថានភាពនៃអត្តបទ', 'status_draft' => 'ព្រាង', 'status_pending' => 'កំពុងរង់ចាំ', 'status_published' => 'បានចេញផ្សាយ', 'title' => 'ចំណងជើងអត្តបទ', 'title_sub' => 'ចំនងជើររងអត្តបទ', 'update' => 'កែសម្រួលអត្តបទ', ];
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/publishable/lang/km/compass.php
publishable/lang/km/compass.php
<?php return [ 'welcome' => 'សូមស្វាគមន៍មកកាន់ Voyager Compass ។ កម្មវិធីល្អនីមួយៗត្រូវការត្រីវិស័យដើម្បីចង្អុលពួកវាទៅទិសដៅត្រឹមត្រូវ។ នៅក្នុងផ្នែកនេះ អ្នកនឹងរកឃើញធនធាន និងកិច្ចការរដ្ឋបាលជាច្រើន ដើម្បីជួយណែនាំអ្នកនៅពេលអ្នកបង្កើតកម្មវិធីរបស់អ្នក។', 'links' => [ 'title' => 'តំណរភ្ជាប់', 'documentation' => 'ឯកសារ', 'voyager_homepage' => 'គេហទំព័រ Voyager', ], 'commands' => [ 'title' => 'ការបញ្ជារ', 'text' => 'ដំណើរការ Command ពី Voyager.', 'clear_output' => 'សម្អាតលទ្ធផល', 'command_output' => 'លទ្ធផលនៃ Command', 'additional_args' => 'បន្ថែមអាគុយម៉ង់?', 'run_command' => 'ដំណើរការ Command', ], 'resources' => [ 'title' => 'ធនធាន', 'text' => 'ធនធាន Voyager ដើម្បីជួយអ្នកស្វែងយល់បានលឿន', ], 'logs' => [ 'title' => 'កត់ត្រា', 'text' => 'កំណត់ត្រានៃប្រព័ន្ធ', 'file_too_big' => 'ឯកសារកំណត់ត្រា >50 មីកាប៊ៃ, សូមលោកអ្នកទាញយកវា។', 'level' => 'កម្រឹត', 'context' => 'ចំណុច', 'date' => 'កាលបរិច្ឆេទ', 'content' => 'មាតិកា', 'download_file' => 'ទាញយកឯកសារ', 'delete_file' => 'លុបឯកសារ', 'delete_all_files' => 'លុបឯកសារទាំងអស់', 'delete_success' => 'បានលុបកំណត់ត្រាដោយជោគជ័យ:', 'delete_all_success' => 'បានលុបទាំងអស់កំណត់ត្រាដោយជោគជ័យ', ], 'fonts' => [ 'title' => 'ពុម្ពអក្សរ', 'font_class' => 'ពុម្ពអក្សរ Voyager', 'font_character' => 'តួអក្សរ Voyager', ], ];
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/publishable/lang/km/database.php
publishable/lang/km/database.php
<?php return [ 'add_new_column' => 'បន្ថែមជួរឈរថ្មី', 'add_softdeletes' => 'បន្ថែមការលុបចេញដោយស្វ័យប្រវត្ដិ', 'add_timestamps' => 'បន្ថែមការបិទពេលវេលាថ្មី', 'already_exists' => 'មានរួចហើយ', 'already_exists_table' => 'តារាង:tableមានរួចហើយ', 'bread_crud_actions' => 'ប្រ៊ដ/សកម្មភាព CRUD', 'bread_info' => 'ព័ត៌មានប្រ៊ដ', 'browse_bread' => 'រុករកប្រ៊ដ', 'column' => 'ជួរឈរ', 'composite_warning' => 'ការព្រមាន: ជួរឈរនេះគឺជាផ្នែកមួយនៃសន្ទស្សន៍ផ្សំ', 'create_new_table' => 'បង្កើតតារាងថ្មី', 'create_your_new_table' => 'បង្កើតតារាងរបស់អ្នក', 'create_model_table' => 'បង្កើត model សម្រាប់តារាងនេះ?', 'default' => 'លំនាំដើម', 'delete_bread_before_table' => 'សូមប្រាកដថាត្រូវលុបប្រ៊ដនៅលើតារាងនេះមុនពេលលុបតារាង។', 'delete_table_confirm' => 'បាទ/ចាស, លុបតារាងនេះ', 'delete_table_question' => 'តើលោកអ្នកប្រាកដទេថាចង់លុបតារាង:tableនេះ?', 'editing_table' => 'កែសម្រួលតារាង:table', 'edit_table' => 'កែសម្រួលតារាង:tableដូចខាងក្រោម៖', 'edit_table_not_exist' => 'តារាងដែលអ្នកចង់កែសម្រួលមិនមានទេ', 'extra' => 'បន្ថែម', 'field' => 'វាល', 'field_safe_failed' => 'បរាជ័យក្នុងការរក្សាទុក:field។ យើងរក្សាទិន្នន័យដូចដើម។', 'index' => 'INDEX', 'input_type' => 'ប្រភេទបញ្ចូល', 'key' => 'ពាក្យគន្លឹះ', 'name_warning' => 'សូមអោយឈ្មោះជួរឈរមុនពេលដាក់ Index', 'no_composites_warning' => 'តារាងនេះមានសន្ទស្សន៍ផ្សំ។ សូមចំណាំថាពួកគេមិនត្រូវបានគាំទ្រនៅពេលនេះទេ។ សូមប្រយ័ត្នពេលព្យាយាមបន្ថែម/យកលិបិក្រមចេញ។', 'null' => 'null', 'optional_details' => 'ព័ត៌មានបន្ថែម (Optional)', 'policy_class' => 'ឈ្មោះ Policy Class', 'policy_name' => 'ឈ្មោះ Policy', 'policy_name_ph' => 'ឧ. \App\Policies\UserPolicy ប្រសិនបើទុកចោលទទេ នឹងព្យាយាមប្រើលំនាំដើម', 'primary' => 'PRIMARY', 'server_pagination' => 'Server-side Pagination', 'success_create_table' => 'បានបង្កើតតារាង:tableដោយជោគជ័យ', 'success_created_bread' => 'បានបង្កើតប្រ៊ដោយជោគជ័យ', 'success_delete_table' => 'បានលុបតារាង:tableដោយជោគជ័យ', 'success_remove_bread' => 'បានដកប្រ៊ដចេញពី:datatypeដោយជោគជ័យ', 'success_update_bread' => 'បានកែសម្រួលប្រ៊ដ:datatypeដោយជោគជ័យ', 'success_update_table' => 'បានកែសម្រួលតារាង:tableដោយជោគជ័យ', 'table_actions' => 'សកម្មភាពតារាង', 'table_columns' => 'តារាងជួរឈរ', 'table_has_index' => 'តាររាងនេះមាន primary index រួចហើយ។', 'table_name' => 'ឈ្មោះតារាង', 'table_no_columns' => 'តារាងមានជួរឈរ...', 'type' => 'ប្រភេទ', 'type_not_supported' => 'ប្រភេទនេះមិនគាំទ្រឡើយ', 'unique' => 'UNIQUE', 'unknown_type' => 'មិនស្គាល់ប្រភេទ', 'update_table' => 'ធ្វើបច្ចុប្បន្នភាពតារាង', 'url_slug' => 'URL Slug (ត្រូវតែមានតែមួយគត់)', 'url_slug_ph' => 'URL slug (ឧ. posts)', 'visibility' => 'ភាពមើលឃើញ', 'relationship' => [ 'relationship' => 'ទំនាក់ទំនង', 'relationships' => 'ទំនាក់ទំនង', 'has_one' => 'មានតែមួយ', 'has_many' => 'មានច្រើន', 'belongs_to' => 'ជាកម្មសិទ្ធិរបស់', 'belongs_to_many' => 'ជាកម្មសិទ្ធិរបស់ច្រើន', 'which_column_from' => 'ជួរឈរណាមួយពី', 'is_used_to_reference' => 'ត្រូវបានប្រើដើម្បីយោង', 'pivot_table' => 'តារាងកណ្តាល', 'selection_details' => 'ព័ត៌មានលម្អិតអំពីការជ្រើសរើស', 'display_the' => 'បង្ហាញ', 'store_the' => 'រក្សាទុក', 'allow_tagging' => 'អនុញ្ញាតឱ្យដាក់ស្លាក', 'easy_there' => 'ងាយស្រួលនៅទីនោះប្រធានក្រុម', 'before_create' => 'មុននឹងអ្នកអាចបង្កើតទំនាក់ទំនងថ្មីបានអ្នកនឹងត្រូវបង្កើតប្រ៊ដជាមុនសិន។<br> បន្ទាប់មកត្រឡប់មកកែសម្រួលប្រ៊ដហើយអ្នកនឹងអាចបន្ថែមទំនាក់ទំនងបាន។<br> សូមអរគុណ។', 'cancel' => 'បោះបង់', 'add_new' => 'បន្ថែមទំនាក់ទំនងថ្មី', 'open' => 'បើក', 'close' => 'បិទ', 'relationship_details' => 'ព័ត៌មានទំនាក់ទំនង', 'browse' => 'រុករក', 'read' => 'អាន', 'edit' => 'កែសម្រួល', 'add' => 'បន្ថែម', 'delete' => 'លុប', 'create' => 'បង្កើតទំនាក់ទំនង', 'namespace' => 'ឈ្មោះម៉ូដែលដែលមានលក្ខណៈសម្បត្តិគ្រប់គ្រាន់ពេញលេញ (ឧ. App\Category)', ], ];
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/publishable/lang/km/login.php
publishable/lang/km/login.php
<?php return [ 'loggingin' => 'កំពុងចូលប្រើប្រាស់ប្រព័ន្ធ', 'signin_below' => 'ចូលប្រើប្រាស់ប្រព័ន្ធដោយចុចនៅខាងក្រោម:', 'welcome' => 'ស្វាគមន៌ការមកដល់នៃ Voyager ដែលជាប្រភេទប្រព័ន្ធគ្រប់គ្រងទិន្នន័យនៃក្រមខណ្ឌ Laravel', ];
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/publishable/lang/km/profile.php
publishable/lang/km/profile.php
<?php return [ 'avatar' => 'រូបតំណាង', 'edit' => 'កែសម្រួលព័ត៌មាន', 'edit_user' => 'កែសម្រួលព័ត៌មានអ្នកប្រើប្រាស់', 'password' => 'ពាក្យសម្ងាត់', 'password_hint' => 'ទុកវាទទេដើម្បីអោយវាដូចតម្លៃដើម', 'role' => 'តួនាទី', 'roles' => 'តួនាទី', 'role_default' => 'គំរូដើមនៃតួនាទី', 'roles_additional' => 'តួនាទីបន្ថែម', 'user_role' => 'តួនាទីអ្នកប្រើប្រាស់', ];
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/publishable/lang/km/bread.php
publishable/lang/km/bread.php
<?php return [ 'add_bread' => 'បង្កើតប្រ៊ដអោយតារាងនេះ', 'bread_crud_actions' => 'ប្រ៊ដ/សកម្មភាព CRUD', 'bread_info' => 'ព័ត៌មានប្រ៊ដ', 'controller_name_hint' => 'ឧ PageController, បើលោកអ្នកទុកចោលវាប្រើប្រាស់ប្រ៊ដ Contoroller', 'create_bread_for_table' => 'បង្កើតប្រ៊ដសម្រាប់តារាង:table', 'default_search_key' => 'ស្វែររកទិន្នន័យដោយស្នើប្រើប្រាស់ម៉ាស៊ីនមេជាលំនាំដើម', 'default_search_key_ph' => 'វាលនេះនឹងត្រូវបានជ្រើសរើសជាមុនសម្រាប់ការស្វែងរកផ្នែកខាងម៉ាស៊ីនមេ', 'delete_bread' => 'លុបប្រ៊ដ', 'delete_bread_conf' => 'បាទ/ចាស លុបប្រ៊ដ', 'delete_bread_quest' => 'តើអ្នកប្រាកដថាចង់លុបប្រ៊ដសម្រាប់តារាង:table?', 'edit_bread' => 'កែសម្រួលព័ត៌មានប្រ៊ដ', 'edit_bread_for_table' => 'កែសម្រួលព័ត៌មានប្រ៊ដនៃតារាង:table', 'error_creating_bread' => 'សូមអភ័យទោស វាអាចមានបញ្ហាក្នុងការបង្កើតប្រ៊ដនេះ', 'error_removing_bread' => 'សូមអភ័យទោស វាហាក់ដូចជាមានបញ្ហាក្នុងការដកប្រ៊ដនេះចេញ', 'error_updating_bread' => 'សូមអភ័យទោស វាអាចមានបញ្ហាក្នុងការអាប់ដេតប្រ៊ដនេះ។', 'error_tagging' => 'សូមអភ័យទោស វាអាចមានបញ្ហាក្នុងការបង្កើតកំណត់ត្រា។ សូមប្រាកដថាតារាងរបស់អ្នកមានលំនាំដើមសម្រាប់វាលផ្សេងទៀត។', 'success_created_bread' => 'បានបង្កើតប្រ៊ដថ្មីដោយជោគជ័យ', 'success_remove_bread' => 'បានយកប្រ៊ដចេញពី:datatypeដោយជោគជ័យ', 'success_update_bread' => 'បានធ្វើបច្ចុប្បន្នភាពដោយជោគជ័យនូវ:datatypeប្រ៊ដ', 'controller_name' => 'ឈ្មោះ Controller', 'create_migration' => 'បង្កើត migration សម្រាប់តារាងនេះ?', 'description' => 'បរិយា', 'display_name' => 'ឈ្មោះបង្ហាញ', 'display_name_plural' => 'ឈ្មោះបង្ហាញ (ពហុវចនៈ)', 'display_name_singular' => 'ឈ្មោះបង្ហាញ (ឯកវចនៈ)', 'edit_rows' => 'កែសម្រួលជួរសម្រាប់តារាង:tableខាងក្រោម', 'generate_permissions' => 'បង្កើតសិទ្ធិដោយស្វ័យប្រវត្តិ', 'icon_class' => 'រូបតំណាងដែលត្រូវប្រើសម្រាប់តារាងនេះ', 'icon_hint' => 'រូបតំណាង (ជាជម្រើស) ប្រើ', 'icon_hint2' => 'ពុម្ភអក្សរ Voyager', 'model_class' => 'ឈ្មោះ Model Class', 'model_name' => 'ឈ្មោះ Model', 'model_name_ph' => 'ឧ. \App\User ប្រសិនបើទុកទទេនឹងព្យាយាមប្រើឈ្មោះតារាង', 'order' => 'លំដាប់', 'order_column' => 'លំដាប់ជួរឈរ', 'order_column_ph' => 'ជួរឈរដែលការបញ្ជាទិញត្រូវបានរក្សាទុក', 'order_direction' => 'លំដាប់ទិសដៅ', 'order_ident_column' => 'បង្ហាញលំដាប់ជួរឈរ', 'order_ident_column_ph' => 'ជួរឈរដែលត្រូវបានបង្ហាញនៅក្នុងទំព័រលំដាប់', 'ordering_not_set' => 'អ្នកត្រូវកំណត់ការបញ្ជាទិញជាមុនសិន', 'policy_class' => 'ឈ្មោះ Policy Class', 'policy_name' => 'ឈ្មោះ Policy', 'policy_name_ph' => 'ឧ. \App\Policies\UserPolicy ប្រសិនបើទុកចោលទទេ នឹងព្យាយាមប្រើលំនាំដើម', 'server_pagination' => 'Server-side Pagination', 'scope' => 'ស្កូប', 'soft_deletes_on' => 'បង្ហាញទិន្នន័យបានលុប', 'soft_deletes_off' => 'លាក់ទិន្នន័យបានលុប', 'updated_order' => 'បានកែសម្រួលលំដាប់ដោយជោគជ័យ', 'url_slug' => 'URL Slug (ត្រូវតែមានតែមួយគត់)', 'url_slug_ph' => 'URL slug (ឧ. posts)', ];
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/publishable/lang/km/menu_builder.php
publishable/lang/km/menu_builder.php
<?php return [ 'color' => 'ពណ៌ជា RGB ឬ Hex (optional)', 'color_ph' => 'ពណ៌, ឧ. #ffffff ឬ rgb (255, 255, 255)', 'create_new_item' => 'បង្កើតធាតុម៉ឺនុយថ្មី។', 'delete_item_confirm' => 'បាទ/ចាស លុបធាតុម៉ឺនុយនេះ។', 'delete_item_question' => 'តើអ្នកប្រាកដថាចង់លុបធាតុម៉ឺនុយនេះទេ?', 'drag_drop_info' => 'អូស និងទម្លាក់ធាតុម៉ឺនុយខាងក្រោម ដើម្បីរៀបចំពួកវាឡើងវិញ។', 'dynamic_route' => 'Dynamic Route', 'edit_item' => 'កែសម្រួលធាតុម៉ឺនុយ', 'icon_class' => 'ថ្នាក់រូបតំណាងពុម្ពអក្សរសម្រាប់ធាតុម៉ឺនុយ (ប្រើ', 'icon_class2' => 'Voyager Font Class</a>)', 'icon_class_ph' => 'Icon Class (optional)', 'item_route' => 'Route សម្រាប់ធាតុម៉ឺនុយ', 'item_title' => 'ចំណងជើងនៃធាតុម៉ឺនុយ', 'link_type' => 'ប្រភេទតំណ', 'new_menu_item' => 'ធាតុម៉ឺនុយថ្មី', 'open_in' => 'បើកជាមួយ', 'open_new' => 'New Tab/Window', 'open_same' => 'Same Tab/Window', 'route_parameter' => 'Route parameters (if any)', 'static_url' => 'Static URL', 'successfully_created' => 'បានបង្កើតធាតុម៉ឺនុយថ្មីដោយជោគជ័យ។', 'successfully_deleted' => 'បានលុបធាតុម៉ឺនុយដោយជោគជ័យ។', 'successfully_updated' => 'បានធ្វើបច្ចុប្បន្នភាពធាតុម៉ឺនុយដោយជោគជ័យ។', 'updated_order' => 'បានធ្វើបច្ចុប្បន្នភាពលំដាប់ម៉ឺនុយដោយជោគជ័យ។', 'url' => 'URL សម្រាប់ធាតុម៉ឺនុយ', 'usage_hint' => 'អ្នកអាចបញ្ចេញម៉ឺនុយនៅកន្លែងណាមួយនៅលើគេហទំព័ររបស់អ្នកដោយការហៅ|អ្នកអាចបញ្ចេញម៉ឺនុយនៅកន្លែងណាមួយនៅលើគេហទំព័ររបស់អ្នកដោយការហៅ', ];
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/publishable/lang/km/date.php
publishable/lang/km/date.php
<?php return [ 'last_week' => 'សប្តាហ៍មុន', 'last_year' => 'ឆ្នាំមុន', 'this_week' => 'សប្តាហ៍នេះ', 'this_year' => 'ឆ្នាំនេះ', ];
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/publishable/lang/km/settings.php
publishable/lang/km/settings.php
<?php return [ 'usage_help' => 'អ្នកអាចប្រើប្រាស់កម្មវិធីនេះដើម្បីបង្ហាញទិន្នន័យនៅលើទំព័រនេះទេ។', 'save' => 'រក្សាទុកការកំណត់', 'new' => 'បន្ថែមការកំណត់', 'help_name' => 'ឈ្មោះការកំណត់ ឧ៖ Admin Title', 'help_key' => 'ពាក្យគន្លឺះការកំណត់ ឧ៖ admin_title', 'help_option' => '(ជាជម្រើស ជម្រើសដូចគ្នានឹងទម្រង់បែបបទដែលត្រូវគ្នាអនុវត្ត)', 'add_new' => 'បន្ថែមការកំណត់', 'delete_question' => 'តើអ្នកប្រាកដជាចង់លុបការកំណត់:settingនេះ?', 'delete_confirm' => 'បាទ/ចាស, លុបការកំណត់', 'successfully_created' => 'បានបង្កើតដោយជោគជ័យ', 'successfully_saved' => 'បានរក្សាទុកដោយជោគជ័យ', 'successfully_deleted' => 'បានលុបដោយជោគជ័យ', 'already_at_top' => 'នេះគឺនៅកំពូលនៃបញ្ជីរួចហើយ', 'already_at_bottom' => 'នេះគឺនៅខាងក្រោមបញ្ជីរួចហើយ', 'key_already_exists' => 'ពាក្យគន្លឺះ:keyមានរួចហើយ', 'moved_order_up' => 'ផ្លាស់ទីការកំណត់:nameទៅលើ', 'moved_order_down' => 'ផ្លាស់ទីការកំណត់:nameទៅក្រោម', 'successfully_removed' => 'បានយក:nameចេញដោយជោគជ័យ', 'group_general' => 'ទូទៅ', 'group_admin' => 'អភិបាល', 'group_site' => 'គេហទំព័រ', 'group' => 'ក្រុម', 'help_group' => 'ដាក់ក្រុមការកំណត់នេះទៅ', ];
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/publishable/lang/km/form.php
publishable/lang/km/form.php
<?php return [ 'field_password_keep' => 'ទុកទទេដើម្បីរក្សាអោយដូចគ្នា', 'field_select_dd_relationship' => 'ត្រូវប្រាកដថារៀបចំទំនាក់ទំនងសមស្របនៅក្នុង :method method នៃ :class class។', 'type_checkbox' => 'Check Box', 'type_codeeditor' => 'Code Editor', 'type_file' => 'File', 'type_image' => 'Image', 'type_radiobutton' => 'Radio Button', 'type_richtextbox' => 'Rich Textbox', 'type_selectdropdown' => 'Select Dropdown', 'type_textarea' => 'Text Area', 'type_textbox' => 'Text Box', ];
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/publishable/lang/km/json.php
publishable/lang/km/json.php
<?php return [ 'invalid' => 'ទម្រង់នៃ JSON មិនត្រឹមត្រូវ', 'invalid_message' => 'ហាក់ដូចជាទម្រង់នៃ JSON មិនត្រឹមត្រូវ', 'valid' => 'ទម្រង់នៃ JSON ត្រឹមត្រូវ', 'validation_errors' => 'មានបញ្ហាក្នុងការផ្ទៀងផ្ទាត់', ];
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/publishable/lang/km/error.php
publishable/lang/km/error.php
<?php return [ 'symlink_created_text' => 'ថតឯកសារផ្ទុកត្រូវបានបង្កើត', 'symlink_created_title' => 'មិនបានបង្កើតថតឯកសារផ្ទុកត្រូវ', 'symlink_failed_text' => 'យើងបរាជ័យក្នុងការបង្កើតតំណដែលបាត់សម្រាប់កម្មវិធីរបស់អ្នក។ វាហាក់ដូចជាអ្នកផ្តល់សេវាបង្ហោះរបស់អ្នកមិនគាំទ្រវាទេ។', 'symlink_failed_title' => 'រកមិនឃើញថតឯកសារផ្ទុកត្រូវ', 'symlink_missing_button' => 'ដោះស្រាយវា', 'symlink_missing_text' => 'រកមិនឃើញថតឯកសារផ្ទុកត្រូវ។ វាអាចបណ្តាលឱ្យមានបញ្ហាជាមួយនឹងការផ្ទុកឯកសារមេឌៀពីកម្មវិធីរុករក។', 'symlink_missing_title' => 'បាត់ថតឯកសារផ្ទុកត្រូវ', ];
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/publishable/lang/de/analytics.php
publishable/lang/de/analytics.php
<?php return [ 'by_pageview' => 'nach Pageviews', 'by_sessions' => 'nach Sessions', 'by_users' => 'nach Benutzern', 'no_client_id' => 'Um Analytics zu sehen müssen Sie Ihre Google Analytics Client ID zu Ihren Einstellungen unter dem Schlüssel <code>google_analytics_client_id</code> hinzufügen. Holen Sie sich Ihren Key in der Google Developer Console:', 'set_view' => 'eine Ansicht wählen', 'this_vs_last_week' => 'Diese Woche im Vergleich zu letzter Woche', 'this_vs_last_year' => 'Dieses Jahr im Vergleich zum letzten Jahr', 'top_browsers' => 'Top Browser', 'top_countries' => 'Top Länder', 'various_visualizations' => 'verschiedenartige Visualisierungen', ];
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/publishable/lang/de/generic.php
publishable/lang/de/generic.php
<?php return [ 'is_rtl' => 'false', 'action' => 'Aktion', 'actions' => 'Aktionen', 'add' => 'Hinzufügen', 'add_folder' => 'Ordner hinzufügen', 'add_new' => 'Neu hinzufügen', 'all_done' => 'Alles erledigt', 'are_you_sure' => 'Sind Sie sicher', 'are_you_sure_delete' => 'Sind Sie sicher dass Sie löschen möchten', 'ascending' => 'Aufsteigend', 'auto_increment' => 'Automatische Werterhöhung', 'bread' => 'BREAD', 'browse' => 'Browse', 'builder' => 'Builder', 'bulk_delete' => 'Massenlöschung', 'bulk_delete_confirm' => 'Ja, alle löschen', 'bulk_delete_nothing' => 'Sie haben nichts ausgewählt', 'cancel' => 'Abbruch', 'choose_type' => 'Typ auswählen', 'click_here' => 'Hier klicken', 'close' => 'Schließen', 'compass' => 'Kompass', 'created_at' => 'Angelegt', 'custom' => 'Custom', 'dashboard' => 'Dashboard', 'database' => 'Datenbank', 'default' => 'Defaultwert', 'delete' => 'Löschen', 'delete_confirm' => 'Ja, löschen!', 'delete_question' => 'Wirklich löschen', 'delete_this_confirm' => 'Ja, löschen', 'descending' => 'Absteigend', 'deselect_all' => 'Alles abwählen', 'download' => 'Herunterladen', 'drag_drop_info' => 'Ändern Sie die Reihenfolge der Elemente durch Drag und Drop.', 'edit' => 'Bearbeiten', 'email' => 'E-Mail', 'error_deleting' => 'Es gab ein Problem beim Versuch dies zu löschen', 'error_restoring' => 'Es gab ein Problem beim Wiederherstellen dieses', 'exception' => 'Exception', 'featured' => 'Featured', 'field_does_not_exist' => 'Feld existiert nicht', 'home' => 'Startseite', 'how_to_use' => 'Verwendung', 'index' => 'Index', 'internal_error' => 'Interner Fehler', 'items' => 'Element(e)', 'keep_sidebar_open' => 'Yarr! Anker werfen! (und Sidebar geöffnet lassen)', 'key' => 'Key', 'last_modified' => 'Zuletzt modifiziert', 'length' => 'Länge', 'locale' => 'Sprache', 'login' => 'Login', 'logout' => 'Logout', 'media' => 'Medien', 'menu_builder' => 'Menü Editor', 'mimetype_not_allowed' => 'Dieser Medientyp ist nicht erlaubt', 'move' => 'Verschieben', 'name' => 'Name', 'new' => 'Neu', 'no' => 'Nein', 'no_thanks' => 'Nein Danke', 'none' => 'Keine', 'not_null' => 'Not Null', 'no_results' => 'Keine Ergebnisse', 'open' => 'Öffnen', 'options' => 'Optionen', 'password' => 'Passwort', 'permissions' => 'Rechte', 'profile' => 'Profil', 'public_url' => 'Öffentliche URL', 'read' => 'Lesen', 'rename' => 'Umbenennen', 'remember_me' => 'Angemeldet bleiben', 'required' => 'Notwendig', 'return_to_list' => 'Zurück zur Liste', 'route' => 'Route', 'save' => 'Speichern', 'search' => 'Suchen', 'select_all' => 'Alles auswählen', 'select_group' => 'Bestehende Gruppe auswählen oder neue Gruppe hinzufügen', 'settings' => 'Einstellungen', 'showing_entries' => 'Zeige :from bis :to von :all Eintrag|Zeige :from bis :to von :all Einträgen', 'submit' => 'Absenden', 'successfully_added_new' => 'Erfolgreich neu hinzugefügt', 'successfully_deleted' => 'Erfolgreich gelöscht', 'successfully_restored' => 'Erfolgreich wiederhergestellt', 'successfully_updated' => 'Erfolgreich bearbeitet', 'successfully_created' => 'Erfolgreich erstellt', 'sweet_success' => 'Sweet Success!', 'timestamp' => 'Zeitstempel', 'title' => 'Titel', 'type' => 'Typ', 'restore' => 'Wiederherstellen', 'unsigned' => 'Unsigned', 'unstick_sidebar' => 'Sidebar ablösen', 'update' => 'Aktualisierung', 'update_failed' => 'Aktualisierung fehlgeschlagen', 'updated_order' => 'Reihenfolge wurde aktualisiert', 'upload' => 'Upload', 'url' => 'URL', 'view' => 'Anzeigen', 'viewing' => 'Zeige', 'whoopsie' => 'Whoopsie!', 'yes' => 'Ja', 'yes_please' => 'Ja, Bitte', ];
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/publishable/lang/de/theme.php
publishable/lang/de/theme.php
<?php return [ 'footer_copyright' => 'Gemacht mit <i class="voyager-heart"></i> von', 'footer_copyright2' => 'Gemacht mit Rum und noch mehr Rum', ];
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/publishable/lang/de/dimmer.php
publishable/lang/de/dimmer.php
<?php return [ 'page' => 'Seite|Seiten', 'page_link_text' => 'Alle Seiten anzeigen', 'page_text' => 'Sie haben :count :string in Ihrer Datenbank.', 'post' => 'Post|Posts', 'post_link_text' => 'Alle Posts anzeigen', 'post_text' => 'Sie haben :count :string in Ihrer Datenbank.', 'user' => 'Benutzer|Benutzer', 'user_link_text' => 'Alle Benutzer anzeigen', 'user_text' => 'Sie haben :count :string in Ihrer Datenbank.', ];
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/publishable/lang/de/seeders.php
publishable/lang/de/seeders.php
<?php return [ 'data_rows' => [ 'author' => 'Autor', 'avatar' => 'Avatar', 'body' => 'Inhalt', 'category' => 'Kategorie', 'created_at' => 'Erstellt am', 'display_name' => 'Anzeigename', 'email' => 'Email', 'excerpt' => 'Ausschnitt', 'featured' => 'Featured', 'id' => 'ID', 'meta_description' => 'Meta Beschreibung', 'meta_keywords' => 'Meta Keywords', 'name' => 'Name', 'order' => 'Reihenfolge', 'page_image' => 'Seiten-Bild', 'parent' => 'Parent', 'password' => 'Passwort', 'post_image' => 'Post-Bild', 'remember_token' => 'Remember Token', 'role' => 'Rolle', 'seo_title' => 'SEO Titel', 'slug' => 'Slug', 'status' => 'Status', 'title' => 'Titel', 'updated_at' => 'Aktualisiert am', ], 'data_types' => [ 'category' => [ 'singular' => 'Kategorie', 'plural' => 'Kategorien', ], 'menu' => [ 'singular' => 'Menu', 'plural' => 'Menus', ], 'page' => [ 'singular' => 'Seite', 'plural' => 'Seiten', ], 'post' => [ 'singular' => 'Post', 'plural' => 'Posts', ], 'role' => [ 'singular' => 'Rolle', 'plural' => 'Rollen', ], 'user' => [ 'singular' => 'Benutzer', 'plural' => 'Benutzer', ], ], 'menu_items' => [ 'bread' => 'BREAD', 'categories' => 'Kategorien', 'compass' => 'Compass', 'dashboard' => 'Dashboard', 'database' => 'Datenbank', 'media' => 'Medien', 'menu_builder' => 'Menu Builder', 'pages' => 'Seiten', 'posts' => 'Posts', 'roles' => 'Rollen', 'settings' => 'Einstellungen', 'tools' => 'Tools', 'users' => 'Benutzer', ], 'roles' => [ 'admin' => 'Administrator', 'user' => 'Normaller Benutzer', ], 'settings' => [ 'admin' => [ 'background_image' => 'Admin Hintergrundbild', 'description' => 'Admin Beschreibung', 'description_value' => 'Willkommen bei Voyager. Dem fehlendem Admin für Laravel', 'google_analytics_client_id' => 'Google Analytics Client ID (für Dashboard)', 'icon_image' => 'Admin Icon', 'loader' => 'Admin Ladebild', 'title' => 'Admin Titel', ], 'site' => [ 'description' => 'Seiten Beschreibung', 'google_analytics_tracking_id' => 'Google Analytics Tracking ID', 'logo' => 'Seiten Logo', 'title' => 'Seiten Titel', ], ], ];
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/publishable/lang/de/datatable.php
publishable/lang/de/datatable.php
<?php // DataTable translations from: https://github.com/DataTables/Plugins/tree/master/i18n return [ 'sEmptyTable' => 'Keine Daten in der Tabelle vorhanden', 'sInfo' => 'Zeige _START_ bis _END_ von _TOTAL_ Einträgen', 'sInfoEmpty' => 'Zeige 0 von 0 Einträgen', 'sInfoFiltered' => '(gefiltert von _MAX_ Einträgen)', 'sInfoPostFix' => '', 'sInfoThousands' => '.', 'sLengthMenu' => 'Zeige _MENU_ Einträge', 'sLoadingRecords' => 'Wird geladen...', 'sProcessing' => 'Bitte warten...', 'sSearch' => 'Suche:', 'sZeroRecords' => 'Keine Einträge vorhanden.', 'oPaginate' => [ 'sFirst' => 'Erste', 'sLast' => 'Letzte', 'sNext' => 'Nächste', 'sPrevious' => 'Zurück', ], 'oAria' => [ 'sSortAscending' => ': aktivieren, um Spalte aufsteigend zu sortieren', 'sSortDescending' => ': aktivieren, um Spalte absteigend zu sortieren', ], ];
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/publishable/lang/de/media.php
publishable/lang/de/media.php
<?php return [ 'add_new_folder' => 'Neuen Ordner hinzufügen', 'audio_support' => 'Ihr Browser unterstützt das Audio Element nicht.', 'create_new_folder' => 'Neuen Ordner erstellen', 'delete_folder_question' => 'Das Löschen eines Ordners wird alle darin enthaltenen Dateien und Ordnder löschen.', 'delete_question' => 'Sind Sie sicher dass Sie die folgenden Dateien löschen möchten?', 'destination_folder' => 'Ziel Ordner', 'drag_drop_info' => 'Dateien mit Drag und Drop hineinziehen oder unten klicken um hochzuladen', 'error_already_exists' => 'Es ist bereits eine Datei bzw. ein Ordner mit diesem Namen in diesem Ordner vorhanden.', 'error_creating_dir' => 'Beim Versuch das Verzeichnis anzulegen ist ein Fehler aufgetreten. Stellen Sie sicher, dass Sie ausreichende Zugriffsrechte dafür haben', 'error_deleting_file' => 'Beim Versuch diese Datei zu löschen ist ein Fehler aufgetreten. Stellen Sie sicher, dass Sie ausreichende Zugriffsrechte dafür haben', 'error_deleting_folder' => 'Beim Versuch diesen Ordner zu löschen ist ein Fehler aufgetreten. Stellen Sie sicher, dass Sie ausreichende Zugriffsrechte dafür haben', 'error_may_exist' => 'Datei oder Ordner unter diesem Namen können bereits existieren. Wählen Sie einen anderen Namen oder löschen Sie die andere Datei.', 'error_moving' => 'Beim Versuch diese Datei bzw. Ordner zu verschieben ist ein Fehler aufgetreten. Stellen Sie sicher, dass Sie ausreichende Zugriffsrechte dafür haben.', 'error_renaming_ext' => 'Die Erweiterung einer Datei kann nicht geändert werden!', 'error_uploading' => 'Hochladen fehlgeschlagen: Unbekannter Fehler aufgetreten!', 'files' => '1 Datei|:count Dateien', 'files_more' => 'Und :count Weitere', 'file_does_not_exist' => 'Datei existiert nicht', 'file_removed' => 'Datei entfernt', 'files_selected' => 'Dateien/Ordner ausgewählt', 'folder_exists_already' => 'Dieser Ordner existiert bereits. Bitte löschen Sie diesen Ordner falls Sie ihn neu anlegen möchten', 'image_does_not_exist' => 'Bild existiert nicht', 'image_removed' => 'Bild entfernt', 'library' => 'Medien Bibliothek', 'loading' => 'LADE IHRE MEDIEN DATEIEN', 'max_files_select' => 'Sie können nur eine Datei auswählen|Sie können maximal :count Dateien auswählen', 'min_files_select' => 'Sie müssen mindestens eine Datei auswählen|Sie müssen mindestens :count Dateien auswählen', 'move_file_folder' => 'Datei/Ordner verschieben', 'new_file_folder' => 'Datei/Ordner anlegen', 'new_folder_name' => 'Name des neuen Ordners', 'no_files_here' => 'Hier sind keine Dateien vorhanden.', 'no_files_in_folder' => 'Keine Dateien in diesem Ordner.', 'nothing_selected' => 'Keine Datei oder Ordner ausgewählt', 'rename_file_folder' => 'Datei/Ordner umbenennen', 'success_uploaded_file' => 'Neue Datei erfolgreich hochgeladen!', 'success_uploading' => 'Bild erfolgreich hochgeladen!', 'success_moved' => 'Datei/Ordner erfolgreich verschoben', 'success_renamed' => 'Datei/Ordner erfolgreich umbenannt', 'uploading_wrong_type' => 'Fehler beim Hochladen: Nicht unterstütztes Dateiformat oder Datei zu groß zum Hochladen!', 'crop' => 'Beschneiden', 'crop_and_create' => 'Beschneiden & erstellen', 'crop_override_confirm' => 'Dies wird das Original überschreiben, sind Sie sicher?', 'crop_image' => 'Bild beschneiden', 'success_crop_image' => 'Bild erfolgreich beschnitten', 'height' => 'Höhe: ', 'title' => 'Titel', 'type' => 'Typ', 'size' => 'Größe', 'public_url' => 'Öffentliche URL', 'last_modified' => 'Zuletzt bearbeitet', 'browser_video_support' => 'Ihr Browser unterstützt das Video Tag nicht.', 'browser_audio_support' => 'Ihr Browser unterstützt das Audio Tag nicht.', 'width' => 'Breite: ', 'add_all_selected' => 'Alle ausgewählten hinzufügen', ];
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false
thedevdojo/voyager
https://github.com/thedevdojo/voyager/blob/7e7e0f4f0e115d2d9e0481a86153a1ceff194c00/publishable/lang/de/post.php
publishable/lang/de/post.php
<?php return [ 'additional_fields'=> 'Zusätzliche Felder', 'category' => 'Post Kategorie', 'content' => 'Post Inhalt', 'details' => 'Post Details', 'excerpt' => 'Ausschnitt <small>Kurzbeschreibung dieses Posts</small>', 'image' => 'Post Bild', 'meta_description' => 'Meta Beschreibung', 'meta_keywords' => 'Meta Keywords', 'new' => 'Post anlegen', 'seo_content' => 'SEO Content', 'seo_title' => 'SEO Titel', 'slug' => 'URL Slug', 'status' => 'Post Status', 'status_draft' => 'Entwurf', 'status_pending' => 'Warten auf Freigabe', 'status_published' => 'veröffentlicht', 'title' => 'Post Titel', 'title_sub' => 'Der Titel des Posts', 'update' => 'Post aktualisieren', ];
php
MIT
7e7e0f4f0e115d2d9e0481a86153a1ceff194c00
2026-01-04T15:03:42.463743Z
false