小编iku*_*ris的帖子

Laravel在某些机器中返回302 - 浏览器

如果打开这个网址,我的应用程序中有一个陌生的行为

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 );,但仍无法正常工作

php routes laravel laravel-4

11
推荐指数
1
解决办法
196
查看次数

在控制器中无法获取用户ID,并且Auth :: check()无法正常工作-Laravel 5.8

我是laravel 5.8的新手,无法Auth在api控制器中使用,以下为详细信息:

  1. 我已将默认用户表从更改usersUser

User.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)

php laravel laravel-5 laravel-5.8

4
推荐指数
1
解决办法
967
查看次数

将参数传递给 Vue.js 中 multiselect 的 @select - vue-multiselect

我想参数传递到@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)

javascript vue.js vue-component vuejs2 vue-multiselect

2
推荐指数
1
解决办法
2319
查看次数