有想要的其他曲子? 求譜系統連結:http://goo.gl/1fDDvn
追蹤Facebook,取得最新琴譜:
Youtube訂閱網址:https://goo.gl/VNHBqt
原key PDF連結
轉貼請標明出處哦 > <
Bringing machine 'default' up with 'virtualbox' provider...
There are errors in the configuration of this machine. Please fix
the following errors and try again:
vm:
* The host path of the shared folder is missing: ~/Code
$ mv composer.phar /usr/local/bin/composer
composer install
php artisan migrate
function save_user_data(id,name,email){
$.ajax({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
},
type: "POST",
url: './user_save',
data: {id:id,name:name,email:email},
success: function(data) {
console.log(data);
console.log("ajax success");
}
})
}
表示他會POST資料到URL為: 網域/user_save
2.改routes.php 決定user_save要用哪個Controller的function去處理
Route::post('/user_save', 'TestController@store');
3.在TestController.php中處理傳來的ajax
class TestController extends Controller
{
public function store(Request $request)
{
$user_id = $request->id;
$user_name = $request->name;
$user_email = $request->email;
return "OK".$user_id.$user_name.$user_email;
}
}
4. 這樣即可以接收到値並回傳 此時Ajax會收到回傳callback資料 印出OK... 就成功了
<meta name="csrf-token" content="{{ csrf_token() }}">
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});