this.getTickets(slot_id).then((val) => {
console.log(val.data);
this.tickets = val.data;
});
{"2":{"id":1,"user_id":1,"slot_id":2,"num_ticket":2,"created_at":"2018-03-31 00:00:00","updated_at":"2018-03-31 00:00:00"},"5":{"id":2,"user_id":1,"slot_id":2,"num_ticket":5,"created_at":"2018-03-31 00:00:00","updated_at":"2018-03-31 00:00:00"},"6":{"id":3,"user_id":1,"slot_id":2,"num_ticket":6,"created_at":"2018-03-31 00:00:00","updated_at":"2018-03-31 00:00:00"}}
@lock
- это окуда public function postLogin(LoginForm $request) {
if($request) {
$login = $request->input('login-l');
$pass = md5($request->input('password-l'));
}
$user = Users::where([['login', $login], ['password', $pass]])->first();
if($user) {
Session::put('id_user', $user->id);
Session::put('role', $user->role);
return redirect('/');
} else {
return redirect()->back()->with('alert', ['color'=>'danger', 'msg'=>'Неверный логин/пароль']);
}
public function tarif_id() {
return $this->hasOne(InvestTarif::class, 'id');
}