我一直在使用FullCalendar v1.5.3进行MS SharePoint替换.
我正在尝试重新渲染日历事件的来源.例如,当页面默认加载时,这是ajax调用
/日历/事件/ feedTasks?开始= 1338094800&结束= 1341118800&_ = 1339103302326
我们使用选择框将事件源更改为仅显示任务(从不同的表中提取),因此在选择之后,ajax调用将更改为:
/日历/事件/ feedEvents?开始= 1338094800&结束= 1341118800&_ = 1339103302326
这有效.但是,它不是仅仅更改当前日历事件源,而是创建一个重复的日历表(div class="fc-content" div在当前日历表之上创建一个新的).
这是我到目前为止:
$("#TaskSelector").change(onSelectChange);
function onSelectChange(){
$('#calendar').fullCalendar({
events: '/calendar/events/' + $('#TaskSelector').val()
});
}
});
Run Code Online (Sandbox Code Playgroud)
我错过了什么?
因此,我使用Vue 2.0和Laravel 5.3创建应用程序。
我已经使用Laravel提供的内置分页功能,通过Vue实现了自己的可排序表。
一切工作正常-除了,我试图离开加入“媒体”多态表,以便可以在表中显示图像。
要启用排序,我不得不使用查询生成器,因为您不能使用Eloquent(AFAIK)对关系进行排序。
我的关系定义如下:
$inventories = $inventories->leftjoin('users as inventory_user', 'inventories.user_id', '=', 'inventory_user.id');
$inventories = $inventories->leftjoin('categories as category', 'inventories.category_id', '=', 'category.id');
$inventories = $inventories->leftjoin('inventories as parent', 'inventories.parent_id', '=', 'parent.id');
Run Code Online (Sandbox Code Playgroud)
哪个工作很棒。但是,在不重复(复制)任何行的情况下,我如何精确地加入多态关系?
我有这个:
$inventories = $inventories->leftJoin('media', function($q) {
$q->on('media.model_id', '=', 'inventories.id');
$q->where('media.model_type', '=', 'App\Models\Inventory');
});
Run Code Online (Sandbox Code Playgroud)
哪个显示媒体(如果它在多态表中有关系)。但是,例如,如果我有1个特定库存物品的5张图像(媒体),则我的查询会针对存在的任何媒体重复库存,在我的情况下,它会重复5次。
这是我的选择查询:
$inventories = $inventories->select(DB::raw("
inventories.id as inventory_id,
inventories.name as inventory_name,
inventories.order_column as inventory_order_column,
category.id as category_id,
category.name as category_name,
parent.name as parent_name,
parent.id as parent_id,
inventories.updated_at as inventory_updated_at,
media.name
"));
Run Code Online (Sandbox Code Playgroud)
我想我需要使用groupBy,但是我不确定在哪里定义它。如果我做
$inventories = $inventories->leftJoin('media', …Run Code Online (Sandbox Code Playgroud) 我正在努力保护我服务器的虚拟主机.我安装LE/Certbot很好,没有问题.我安装/升级了任何依赖项以使certbot工作,再次运行正常.
mod_ssl已安装并加载.我跑了phpinfo(),在那个LoadedModules部分,我明白了mod_ssl.
但是,在我的vhosts文件中,当我使用时
<IfModule mod_ssl.c>
<VirtualHost *:443>
...
</VirtualHost>
</IfModule>
Run Code Online (Sandbox Code Playgroud)
<VirtualHost></VirtualHost>忽略该特定站点块(即我无法访问VirtualHost块中定义的站点),除非我删除/注释掉`wrapper.
httpd版本:
$ httpd -v
Server version: Apache/2.4.6 (CentOS)
Server built: Apr 12 2017 21:03:28
Run Code Online (Sandbox Code Playgroud)
我在网上找不到多少,所以我有点卡住了.如果我不明白为什么,我担心会有更多险恶的事情让我感到困惑.
任何帮助将非常感激!
干杯
我知道这已被问过10万次,但我几乎已经阅读了所有10万份回复,但这些回复似乎与我追求的完全不符.我已经尝试了所有可能的组合(显然不是),我担心我会因为相对简单的事情而受到打击.这是我的第二个蛋糕项目,所以我绝不是专家.
简介 - > BelongsTo - >商店,商店 - > BelongsTo - >地区,地区 - > HasMany - >商店
轮廓 .php
class Profile extends AppModel {
public $belongsTo = array(
'Store' => array(
'className' => 'Store',
'foreignKey' => 'store_id'....
Run Code Online (Sandbox Code Playgroud)
商店 .php
class Store extends AppModel {
public $belongsTo = array(
'Region' => array(
'className' => 'Region',
'foreignKey' => 'region_id'....
Run Code Online (Sandbox Code Playgroud)
区域 .php
class Region extends AppModel {
public $hasMany = array(
'Store' => array(
'className' => 'Store',
'foreignKey' => 'region_id'....
Run Code Online (Sandbox Code Playgroud)
ProfileController可 .php
$this->Paginator->settings …Run Code Online (Sandbox Code Playgroud) apache ×1
cakephp ×1
cakephp-2.3 ×1
fullcalendar ×1
httpd.conf ×1
https ×1
jquery ×1
laravel ×1
laravel-5.3 ×1
mod-ssl ×1
pagination ×1
php ×1
vhosts ×1
vue.js ×1