
我认为在此期间向用户显示任何类型的加载反馈会很好.
我想创建自己的加载动画,并选择我自己的颜色,样式和大小.

从数据库检索数据时显示加载动画的最有效方法是什么?
我的数据库中大约有20,000行,我使用DataTable加载所有这些数据。
使用DataTable提高加载速度最有效的方法是什么?
更新:
这是我的桌子
<table id="inventory_exact"> ...
这是我的设置
// Setting to Inventory Table
$('#inventory_exact').dataTable({
"lengthMenu": [ 10 ] ,
"bLengthChange": false,
"searchHighlight": true,
"bInfo" : false
});
Run Code Online (Sandbox Code Playgroud)
更新2: -服务器端
@niyou:我使用PHP Laravel,因此我查询数据并通过执行这些操作显示它们
@foreach ( Inventory::all() as $inventory)
<tr>
<td>{{ $inventory->sku }} </td>
<td>{{ $inventory->description }} </td>
<td>${{ $inventory->price }} </td>
<td>{{ $inventory->stock }} </td>
</tr>
@endforeach
Run Code Online (Sandbox Code Playgroud) <input id="email" name="email" type="text" value="ooooo@gmail.com">
Run Code Online (Sandbox Code Playgroud)
如何获取id = email的值并将其打印到我的控制台或任何地方以进行测试?
我试过了,但没有运气:(
<script type="text/javascript">
document.getElementById('email').innerText;
</script>
Run Code Online (Sandbox Code Playgroud) <?php
foreach(array_unique(array_values($continent)) as $continent_id){
if($continent_id == 1 ){ $continent == "Europe" ; }
elseif ($continent_id == 2 ){ $continent == "Asia" ; }
elseif ($continent_id == 3 ){ $continent == "North America" ; }
elseif ($continent_id == 4 ){ $continent == "Oceania" ; }
elseif ($continent_id == 5 ){ $continent == "South America" ; }
else { $continent == "Africa" ; }
echo '<h1>#'.$continent."</h1>";
Run Code Online (Sandbox Code Playgroud)
我收到此错误消息
数组到字符串转换(查看:C:\ wamp\www\distributor-application\laravel\app\views\jsons\decoding.blade.php)
有人能告诉我我错过了什么吗?
text我的地址<div>.<div id="address"> 410 Walker Street Lowell MA 01851</div>null价值.这是我尝试过的:
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<div id="address"> 410 Walker Street Lowell MA 01851</div>
<h1>console.log();</h1>
<button onclick="myFunction()">Run</button>
<script type="text/javascript">
function myFunction() {
var uri = "www. google.com";
var res = encodeURIComponent(uri);
var address = document.getElementById("address");
console.log(uri); // print out = www. google.com
console.log(res); // print out = www.%20google.com
console.log(address); // print out = null ????
}
</script>
Run Code Online (Sandbox Code Playgroud) 我有一个搜索输入框.

我已经检查了前2个字符.
$first_two = substr($search,0,2);
他们需要从BS开始,所以我检查它们是这样的:
if ($search AND $first_two == 'bs' ){
// ... do stuffs
}
Run Code Online (Sandbox Code Playgroud)
在那之后,我才意识到我不想对它们有任何限制.
我希望我的前两个字符不区分大小写.
我想允许BS,Bs,bs和bS.
我需要修复什么if (?)才能让它们发生?
CONTROLLER
public function index() {
$users = User::all(); // Is there a way to chain it with the except method or sth like that
return View::make('distributors.index')->with('users',$users);
}
Run Code Online (Sandbox Code Playgroud)
目标
我想查询我的所有用户表,但只有一个.
我想列出我的客户的所有用户,但我想隐藏自己.
题
我怎么做 ?我是以正确的方式接近它吗?
随意给我任何改进的建议.
我想更改Laravel随附的分页颜色。
默认情况下,它看起来像这样:

假设,我想将其更改为绿色,以匹配我网站的主题。有人可以告诉我在哪里可以更改?
我的目标是检查用户表中的所有用户,看看他们是否在线使用Laravel 4. 我也对谁没有登录感兴趣。稍后,我想打印 2 个单独的列表,列出谁在线、谁不在线?
Auth::check()Laravel 附带的功能吗?database?样本

我的一个视图中有一个项目列表.我最多只能容纳6件商品,它的布局如下:

我用过class="col-md-2"每一个.
当我超过6时,它只是简单地转到另一行.我不希望这样.你可以在这里看到它.

现在,if列表中有6 or more项目,
>以便用户知道还有更多
Edit
这是我到目前为止所得到的.我使用了Larval 4,所以这个语法就在HTML/Blade.
@foreach ( MarketingMaterialCategory::all() as $mmc )
<h2><i class="fa fa-file-image-o color lighter"></i> {{{ $mmc->name or '' }}} <small> </small></h2>
<div class="row">
@foreach ( MarketingMaterial::where('marketing_materials_category_id','=', $mmc->id )->get() as $marketing_material)
<div class="col-md-2" >
<!-- Shopping items -->
<div class="shopping-item">
<!-- Image -->
<div class="col-sm-12 imgbox" >
<!-- <span class="col-sm-6"></span> -->
<a href="#"><img class="col-sm-12 pull-right" width="200" src="/marketing_materials/{{$marketing_material->id}}/download/thumb_path" alt="" /></a>
</div>
<!-- Shopping …Run Code Online (Sandbox Code Playgroud) 我想把我的按钮放在右下角.
这是我尝试过的:
!important,但没有效果CSS:
#back-to-top {
position: fixed !important;
right:400 !important;
bottom: 17!important;
color: black;
border: #90bc26 solid 1px;
border-radius: 5px;
padding: 5px;
}
Run Code Online (Sandbox Code Playgroud)
这是我在检查按钮时看到的内容:

正如你所看到的,我right和我的bottom风格被覆盖了,我该如何解决?
我想打印"我们找不到与您提供的信息相符的电子邮件."
但PHP不会让我.有人知道怎么修这个东西吗 ?

`return Redirect :: route('account-forgot-password')
->with('error','We can't find an email matching the information you provided. You may have entered an email that doesn't exactly match our records. Try again ');`
Run Code Online (Sandbox Code Playgroud) 我想覆盖所有img标签的样式 <div class="profile-activity">
这是我尝试过的
<style type="text/css">
.profile-activity img {
width: 200px !important;
border: red 2px solid;
}
</style>
<img class="" id="Company Logo" src="/files/logo_path/{{$user->id}}" alt="User's Photo" width="200" >
Run Code Online (Sandbox Code Playgroud)
我想迫使我的internalCSS超越我的externalCSS.我!important不行.宽度不起作用,但边框确实有效.
结果

php ×8
css ×4
html ×4
laravel-4 ×4
jquery ×3
laravel ×3
javascript ×2
mysql ×2
arrays ×1
blade ×1
console.log ×1
database ×1
datatables ×1
pagination ×1