register 1
register 1
This commit is contained in:
parent
6ac15da622
commit
4b66b88e1a
@ -51,6 +51,7 @@ class RegisterController extends Controller
|
||||
'name' => 'required|string|max:255',
|
||||
'email' => 'required|string|email|max:255|unique:users',
|
||||
'password' => 'required|string|min:6|confirmed',
|
||||
'username' => 'required|string|max:20|unique:users'
|
||||
]);
|
||||
}
|
||||
|
||||
@ -66,6 +67,7 @@ class RegisterController extends Controller
|
||||
'name' => $data['name'],
|
||||
'email' => $data['email'],
|
||||
'password' => bcrypt($data['password']),
|
||||
'username' => $data['username']
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
define('YOUR_SERVER_URL', 'http://memorygame.dev');
|
||||
define('YOUR_SERVER_URL', 'http://badmemory.test');
|
||||
// Check "oauth_clients" table for next 2 values:
|
||||
define('CLIENT_ID', '2');
|
||||
define('CLIENT_SECRET','O6XUA7EQ51qEG4CCEVgUuN41lln3XXSFYbmeb2G4');
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
|
||||
<form action="action_page.php">
|
||||
<form @submit.prevent="login(user)">
|
||||
<div class="container">
|
||||
<div class="form-group">
|
||||
<label>Email: </label>
|
||||
@ -11,7 +11,7 @@
|
||||
<label>Password: </label>
|
||||
<input type="password" v-model="user.password" placeholder="Enter Your Password" id="inputPassword" name="password" required>
|
||||
</div>
|
||||
<button type="submit" v-on:click().prevent="login()">Login</button>
|
||||
<button type="submit" v-on:click().prevent="login()">Login</button>
|
||||
<button type="submit" v-on:click().prevent="register()">Register</button>
|
||||
</div>
|
||||
|
||||
@ -28,8 +28,8 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
user : {
|
||||
email:"",
|
||||
password:""
|
||||
email: '',
|
||||
password: ''
|
||||
},
|
||||
loginError: false
|
||||
};
|
||||
@ -56,10 +56,6 @@ export default {
|
||||
});
|
||||
|
||||
},
|
||||
register: function() {
|
||||
this.$router.push('/register'); // vou chamar um component do appvue.vue
|
||||
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
<template>
|
||||
|
||||
<!-- falta aqui o form do tipo submit e cenas -->
|
||||
<form v-on="submit.prevent=register(user)">
|
||||
<form @submit.prevent=register(user)">
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="username">Username</label>
|
||||
<div class="controls">
|
||||
|
2
laravel_server/resources/assets/js/vueapp.js
vendored
2
laravel_server/resources/assets/js/vueapp.js
vendored
@ -42,7 +42,5 @@ const router = new VueRouter({
|
||||
const app = new Vue({
|
||||
router,
|
||||
data:{
|
||||
player1:undefined,
|
||||
player2: undefined,
|
||||
}
|
||||
}).$mount('#app');
|
||||
|
Loading…
x
Reference in New Issue
Block a user