如果打开这个网址,我的应用程序中有一个陌生的行为
http://example.com/Pd/Country/1
Run Code Online (Sandbox Code Playgroud)
在某些机器和浏览器中,我得到了预期的结果,响应代码是200其他机器返回的地方302
在我的 routes
Route::group(array('prefix' => 'Pd'), function() {
Route::get('Country/{id}','CountryController@getAll');
});
Run Code Online (Sandbox Code Playgroud)
更新
我发现这个问题是在一些机器和浏览器不坚持会议,我有一些建议,以增加Session::save();后Session::push('keyvalue',$keyvalue );,但仍无法正常工作
我是laravel 5.8的新手,无法Auth在api控制器中使用,以下为详细信息:
users为UserUser.php
<?php
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
use Notifiable;
protected $table = 'User';
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'firstName', 'lastName', 'email', 'password',
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
'password', 'remember_token',
];
/**
* The attributes that …Run Code Online (Sandbox Code Playgroud) 我想参数传递到@select事件功能Vue.js
HTML
<template>
<div class="container">
<div v-for="(billItem, k) in billItems" :key="k" >
<div class="form-group row">
<label class="col-form-label col-sm-3" for=""> Products</label>
<div class="col-sm-3">
<div class="form-group">
<label for="">Product</label>
<multiselect
v-model="billItem.billItem_selectedGood"
:options="productOptions"
:close-on-select="true"
:clear-on-select="false"
:hide-selected="true"
:preserve-search="true"
placeholder="Select Product"
label="name"
track-by="name"
:preselect-first="false"
id="example"
@select="onSelect_selectedGood"
>
</multiselect>
</div>
</div>
</div>
</div>
</template>
Run Code Online (Sandbox Code Playgroud)
JS
<script>
export default {
data(){
return {
form: new Form({
})
}
},
methods : {
onSelect_selectedGood( option, id) {
console.log("onSelect_selectedGood");
console.log(option);
}
},
mounted() {
}
}
</script> …Run Code Online (Sandbox Code Playgroud) laravel ×2
php ×2
javascript ×1
laravel-4 ×1
laravel-5 ×1
laravel-5.8 ×1
routes ×1
vue.js ×1
vuejs2 ×1