alpha_dash
驗證欄位值是否僅包含字母、數字、破折號( - )以及底線( _ )。
4.
implode() 函数返回由数组元素组合成的字符串。
5.self this
http://charleslin74.pixnet.net/blog/post/435851786-%5Bphp%5D-php%E8%A3%A1self%E5%92%8Cthis%E5%8F%8Aparent%E7%9A%84%E5%B7%AE%E5%88%A5
7.
in:foo,bar,...
驗證欄位值有在給定的清單裡。
6.
array_keys() 函数返回包含数组中所有键名的一个新数组。
7.
[Vue warn]: Error in render function: "TypeError: Cannot read property 'data' of undefined"
ajax失敗會傳
8.
strpos() 函数查找字符串在另一字符串中第一次出现的位置。
9.
list()
把数组中的值赋给一些变量:
<?php
$my_array = array("Dog","Cat","Horse");
list($a, $b, $c)
= $my_array;
echo "I have several animals, a $a, a $b and a $c.";
?>
10.
array_keys() 返回包含数组中所有键名的一个新数组:
11.blade
@inject 注入服務 @inject("alias',APP')
堆
@stack('js')
@push('js')
@endpush
____
12.
文件用到的變this.axios.
14.
template scope slot
http://www.jianshu.com/p/a0a83029a217
17.
passport和jwtauth都可以用Auth::id()
$product=Product::create($request->all()+['user_id'=>Auth::id()])
18.
Post::has('commnets')
Post::whereHas('comments',function($q){}
關聯
19.
$request->has('search_query_1')
20.
vue的select
21.
Auth::guest()
22.
https://blog.jason.party/2/factory-method-pattern
https://blog.jason.party/1/dip#-Dependency
https://laravel-china.org/topics/789/laravel-learning-notes-the-magic-of-the-service-container
依賴注入反轉控制
工廠模式介紹
23.array_unshift 插入到array前
<?php
$queue = array("orange", "banana");
array_unshift($queue, "apple", "raspberry");
print_r($queue);
?>
以上例程会输出:
Array ( [0] => apple [1] => raspberry [2] => orange [3] => banana )
24.
repository
http://www.bijishequ.com/detail/246074?p=
25.
$collection = collect([1, 2, 3, 4, 5, 6, 7]); $chunks = $collection->chunk(4); $chunks->toArray(); // [[1, 2, 3, 4], [5, 6, 7]]
26.\
shuffle()
shuffle
方法随机打乱集合中的数据项:
$collection = collect([1, 2, 3, 4, 5]);
$shuffled = $collection->shuffle();
$shuffled->all();
// [3, 2, 5, 1, 4] // (generated randomly)
27.
undefine offset 沒有陣列
28.
push 到array
29.
TypeError: Cannot read property 'protocol' of undefined#632
跟vue.axios.defaults.baseUrl無關
跟get post有關
30.
arr.reduce(callback, [initialValue])