问题标签 [voyager]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
8575 浏览

laravel - 更改航海者模型

我想在 Voyager 的 User 类上添加一些修改器,但我不会更改 vendor 文件夹内的任何内容,并且 Voyages 在包内使用 User 模型。我有可能以某种方式改变这一点吗?

0 投票
1 回答
1492 浏览

php - Laravel 航海者迁移问题

我正在研究 Windows 和 WAMP。我在 cmd 中安装了 Laravel 5.4 并且成功了。之后我遵循 laravel voyager 安装过程,这也成功了。

之后我检查了/migrations/文件夹,有很多表要迁移,对于 laravel 本身和 voyager,但是当我输入php artisan migratecmd 它只迁移“用户”表时,它忽略了其他表,所以 voyager 无法工作并显示表丢失的错误。

我搜索了互联网,但找不到此类问题。

我正在使用 mysql

0 投票
2 回答
745 浏览

php - voyager php artisan voyager:install --with-dummy 错误

[Illuminate\Database\QueryException] SQLSTATE[42000]:语法错误或访问冲突:1071 指定的键太长;最大密钥长度为 1000 字节(SQL:alter table translationsadd unique translations_table_name_column_name_foreign_key_locale_unique( table_ name, column_name, foreign_key, locale))

[Doctrine\DBAL\Driver\PDOException] SQLSTATE[42000]:语法错误或访问冲突:1071 指定的键太长;最大密钥长度为 1000 字节

[PDOException] SQLSTATE[42000]:语法错误或访问冲突:1071 指定的键太长;最大密钥长度为 1000 字节

AppServiceProvider.php这种方法不起作用我无法修复这个错误,有什么方法可以修复它?

0 投票
0 回答
275 浏览

laravel - Voyager (Laravel): Exception while rendering read-blade with many-to-many relation

I've started to use Voyager and I'm facing problems with resolving relations. I receive an exception whenever I try to view/read a database entry that contains a many-to-many relation to another table.

I have 2 tables, tours and activities that are related via an m to n relation, and an intermediate table activity_tour. I've prepared the tables for voyager as mentioned in the docs.

Table tours:
id | title | someOtherStuff | activities
where id is a string.

Table activities
id | someOtherStuff | tours
id is a string again. In the BREAD-builder menu, I've added

to the tours column of the activities table.

The Activity-Model contains the following method to resolve the relation

Table activity_tour
activity_id | tour_id

I receive the following error, whenever I want to view a specific Activity-entry. The code-part that causes the exception can be found here (Corresponding file: vendor/tcg/voyager/resources/views/bread/read.blade.php - starting at line 51).

But whenever I want to edit an activity, all related tours are loaded and displayed correctly without any error.

Versions

  • Database: 10.2.3-MariaDB Homebrew
  • Laravel: 5.4
  • Voyager: v0.11.10
0 投票
1 回答
1593 浏览

laravel - 将 laravel voyager 连接到现有表

有谁知道如何将 voyager 连接到现有表?

如果表不存在,则转到 Database=>Create 并指定名称和列并创建一个将显示在表列表中的表,但是当有表时我们该怎么办?

我尝试填写表格并单击“创建新表”按钮并收到“表已存在”错误,这很明显。

0 投票
1 回答
516 浏览

php - 只有 created_at 和 Updated_at 列接受我新创建的 voyager laravel 数据库表中的数据

我使用 voyager 数据库菜单添加了一个新表。问题是我无法用我新创建的数据库创建新数据......每当我尝试插入新数据时,它只有 created_at 和 Updated_at 列被填充

和代码:

这是我的 Profiles 表的模型代码:

0 投票
4 回答
9163 浏览

php - Laravel Voyager 覆盖 BREAD 控制器

我已经开始使用 Voyager,但我遇到了控制器问题。

我在数据库中创建了一个名为 Progress 的新表,voyager 默认创建一个 BREAD 表单来浏览 read delete 和 add items 。

当用户添加新项目时,我喜欢将默认值放入字段中。我喜欢输入的默认值是 authentication user_id

我怎样才能做到这一点?

谢谢。

0 投票
2 回答
647 浏览

php - Mysql 导入 laravel voyager 数据库报错-Specified key was too long;最大密钥长度为 767 字节

由于指定的密钥太长,似乎无法将 laravel 数据库上传到实时服务器。SQL ERROR示例显示键约束太长,但它不仅在一个表上,而且在多个表上。有没有办法更新这个或更改我的数据库以便能够上传它?我遵循了应用服务提供商中的指南,但我不确定是否必须删除数据库,然后使用应用服务提供商的 boot() 方法的键约束再次迁移。请帮忙。

0 投票
10 回答
10752 浏览

php - Laravel 5 的航海者:图像的错误路径

通过 Voyager 创建新用户后,头像显示为损坏的图像。我上传了一张新图片,但图片仍然损坏。

我在 Google Chrome 中使用 Console 进行了检查,发现 3 404 错误:

2017-06-19 10:53:50.159 http://localhost:8888/storage/users/June2017/ypKlbqbATDbpnYctZBFp.png 加载资源失败:服务器响应状态为 404(未找到)

2017-06-19 10:53:50.256 http://localhost:8888/storage/users/June2017/ypKlbqbATDbpnYctZBFp.png 加载资源失败:服务器响应状态为 404(未找到)

2017-06-19 10:53:50.473 http://localhost:8888/vendor/tcg/voyager/assets/images/bg.jpg加载资源失败:服务器响应状态为 404(未找到)当我查看项目,2个存储错误的路径是:http://localhost:8888/storage/app/public/users/和: http://localhost:8888/storage/app/public/users/June2017

在媒体中,我在浏览文件夹时看到了类似的路径问题:

2017-06-19 11:38:22.248 %7B%7B%20selected_file.path%20%7D%7D:1 GET http://localhost:8888/development/PhpstormProjects/Search4Venues/public/admin/%7B%7B% 20selected_file.path%20%7D%7D 404(未找到)

预料到这个问题,.env我有:APP_URL=http://localhost:8888

这是配置错误吗?

编辑

一位比我更有经验的同事通过 Voyager 发现了一些不一致的地方,他试图解决这些问题。

app.php中,我们不得不改变:

... 至:

filesystems.php中,我们不得不改变:

... 至:

但是,他发现了其他问题config/voyager.php

...路径中似乎也缺少它PhpstormProjects/Search4Venues

在这个阶段,我们不知道 Voyager 还有什么问题。

0 投票
1 回答
391 浏览

php - 我看不到 Voyager 的管理面板是因为我使用的是 Windows 吗?

所以,我已经在我的新 Laravel 项目中安装了 Voyager。即使我在文档页面上做了所有关于如何安装它的事情。我无法通过管理面板。

我现在正在使用 Windows 10。所有的路由和页面都在我的 laravel 项目的 vendor 文件夹中。我将如何访问它?如何访问 Voyager 的登录页面。

所有 youtube 视频教程都使用 Macintosh,安装 Voyager 后,他们可以立即访问登录页面。

非常感谢。我几乎做了一切,包括升级。