Kaynağa Gözat

Copy token functions to vue component

tags/v0.1.0
Immanuel Onyeka 3 yıl önce
ebeveyn
işleme
24e3bc3633
4 değiştirilmiş dosya ile 23 ekleme ve 56 silme
  1. +0
    -53
      .env
  2. +1
    -0
      .gitignore
  3. +19
    -1
      resources/js/register-area/register-area.vue
  4. +3
    -2
      resources/views/home.blade.php

+ 0
- 53
.env Dosyayı Görüntüle

@@ -1,53 +0,0 @@
APP_NAME=Trendplays
APP_ENV=local
APP_KEY=base64:qEf11CH7LBSuw7W1mm11PcvrTA3kz6AwfEXqk3p6e3s=
APP_DEBUG=true
APP_URL=http://localhost

LOG_CHANNEL=stack
LOG_LEVEL=debug

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=trendplays
DB_USERNAME=trendplays
DB_PASSWORD=testpassword123

BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120

MEMCACHED_HOST=127.0.0.1

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_MAILER=smtp
MAIL_HOST=mailhog
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=null
MAIL_FROM_NAME="${APP_NAME}"

AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1

MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

STRIPE_KEY=pk_test_51IeSwmBPMoXn2pf9VrXisJ7ubIjWHfnNWm1Iac8WB8H7hmBiJAw3GZrD8If9shKoSfSvT9my9lGdv0O0UzsbI4Iq00gn0MpA8S
VUE_APP_STRIPE_KEY=pk_test_51IeSwmBPMoXn2pf9VrXisJ7ubIjWHfnNWm1Iac8WB8H7hmBiJAw3GZrD8If9shKoSfSvT9my9lGdv0O0UzsbI4Iq00gn0MpA8S
STRIPE_SECRET=sk_test_51IeSwmBPMoXn2pf9h2APPrSD8oGc5RmsO8xj6dkVtM6FrHtD84Gw5M6Mm4epaicTqRm4hpuTny8E593hNdAiKMes006IBMfAcc

+ 1
- 0
.gitignore Dosyayı Görüntüle

@@ -7,6 +7,7 @@ vendor/


# local env files
.env
.env.local
.env.*.local



+ 19
- 1
resources/js/register-area/register-area.vue Dosyayı Görüntüle

@@ -53,9 +53,24 @@
</template>

<script>
function getCookie(name) {
var re = new RegExp(name + "=([^;]+)")
var value = re.exec(document.cookie)

return (value != null) ? unescape(value[1]) : null
}

function getToken() {
return fetch("/sanctum/csrf-cookie", {
method: 'GET'
}).then( () => {
this.token = this.getCookie('XSRF-TOKEN')
return this.token
})
}
function register(event) {
this.active = 'loading'
fetch("/register", {
this.getToken().then(() => {fetch("/register", {
method: 'POST',
headers: {'Content-Type': 'application/json',
'Accept': 'application/json',
@@ -81,6 +96,7 @@
/* console.log(response.json()) */
});
event.preventDefault();
})
}

function checkPasswords() {
@@ -122,6 +138,8 @@
return {active: 'register', token: '', errorMessage: ''}
},
methods: {
getToken,
getCookie,
register,
checkPasswords,
forgotPassword,


+ 3
- 2
resources/views/home.blade.php Dosyayı Görüntüle

@@ -164,10 +164,11 @@
battle. Reaching just 10,1000 organic views can be tough because social networks give
the lion's share of exposure to the personalities who already have the biggest
following. The more views and impressions a post has, the more people are
willing to watch it, that's why consistent and high engagement is essential to your brand's online growth. </p>
willing to watch it, that's why consistent and high engagement is
essential to your brand's online growth. </p>
<p>Give your content the fair chance it deserves with a boost to your
account's traffic. We'll help you build your audience, develop your brand, and
launch your new career.</p>
launch your new business.</p>
</div>
</section>
<section class='faq-info'>


Yükleniyor…
İptal
Kaydet