1.var app=new Vue({
el:'#app',
components:{DataViewer}
})
2.
laravel的核心
http://www.sohu.com/a/117615664_466839
3.

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.

The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths.

php artisan key:generate

13.

改Vue axios base url

import axios from 'axios'
import VueAxios from 'vue-axios'
Vue.use(VueAxios,axios)
Vue.axios.defaults.baseURL = 'http://localhost/laravel/spa-laravel-vuejs-master/public';

文件用到的變this.axios.

14.

template scope slot

http://www.jianshu.com/p/a0a83029a217

15.

spa

刪除自己的東西

如果product.user_id= 本地存的一些資訊localstorage token User的資料ID NAME account

就可以刪除

16.

要刪除vue某個產品

products

先找Index

function(product 子元件傳上來的物件

let index=this.products.indexOf(product)

this.products.splice(index,1)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

 

 
<select v-model="selected">
<option disabled value="">请选择</option>
<option>A</option>
<option>B</option>
<option>C</option>

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

$items[]=new InvoiceItem($item);

29.

TypeError: Cannot read property 'protocol' of undefined#632

跟vue.axios.defaults.baseUrl無關

跟get post有關

30.

 

arr.reduce(callback, [initialValue])
computed:{
subTotal(){
return this.form.items.reduce((carry,item)=>{
return carry + parseFloat(item.qty)*parseFloat(item.unit_price)
},0)
}
}
要有0才不會變物件
arrow
arrow
    全站熱搜

    學習程式 發表在 痞客邦 留言(0) 人氣()