Skip to content

Commit f3f47d4

Browse files
Add global variables for date and username
1 parent 5201e61 commit f3f47d4

File tree

5 files changed

+20
-19
lines changed

5 files changed

+20
-19
lines changed

app/Http/Middleware/HandleInertiaRequests.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ public function share(Request $request): array
5151
'avatar' => 'https://painrehabproducts.com/wp-content/uploads/2014/10/facebook-default-no-profile-pic.jpg',
5252
'auth' => [
5353
'user' => Auth::user()
54-
]
54+
],
55+
'currentYear' => date('Y'),
56+
'username' => 'perisicnikola37'
5557
]);
5658
}
5759
}

resources/js/Pages/Roles/Create.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,8 @@
2727
</form>
2828

2929
<p class="text-xs text-center text-gray-500">
30-
&copy;2023 -
31-
<a class="text-blue-500" href="https://github.com/perisicnikola37"
32-
target="_blank">@perisicnikola37</a>
30+
&copy; {{ $page.props.currentYear }} - <a class="text-blue-500"
31+
href="https://github.com/perisicnikola37" target="_blank">@{{ $page.props.username }}</a>
3332
</p>
3433
</div>
3534
</div>

resources/js/Pages/Roles/Edit.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
</div>
2525
</form>
2626
<p class="text-xs text-center text-gray-500">
27-
&copy;2023 - <a class="text-blue-500" href="https://github.com/perisicnikola37"
28-
target="_blank">@perisicnikola37</a>
27+
&copy; {{ $page.props.currentYear }} - <a class="text-blue-500"
28+
href="https://github.com/perisicnikola37" target="_blank">@{{ $page.props.username }}</a>
2929
</p>
3030
</div>
3131

resources/js/Pages/Users/Create.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@
7878
</form>
7979

8080
<p class="text-xs text-center text-gray-500">
81-
&copy;2023 - <a class="text-blue-500" href="https://github.com/perisicnikola37"
82-
target="_blank">@perisicnikola37</a>
81+
&copy; {{ $page.props.currentYear }} - <a class="text-blue-500"
82+
href="https://github.com/perisicnikola37" target="_blank">@{{ $page.props.username }}</a>
8383
</p>
8484
</div>
8585
</div>

resources/js/Pages/Users/Edit.vue

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,35 +6,35 @@
66
</template>
77

88
<div class="py-12">
9-
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
10-
<div class="m-auto w-full max-w-xs">
11-
<form @submit.prevent="submit" class="bg-white shadow-md rounded px-8 pt-6 pb-8 mb-4">
9+
<div class="mx-auto max-w-7xl sm:px-6 lg:px-8">
10+
<div class="w-full max-w-xs m-auto">
11+
<form @submit.prevent="submit" class="px-8 pt-6 pb-8 mb-4 bg-white rounded shadow-md">
1212

1313
<div class="mb-4">
14-
<label class="block text-gray-700 text-sm font-bold mb-2" for="name">
14+
<label class="block mb-2 text-sm font-bold text-gray-700" for="name">
1515
Name
1616
</label>
1717
<input v-model="form.name"
18-
class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
18+
class="w-full px-3 py-2 leading-tight text-gray-700 border rounded shadow appearance-none focus:outline-none focus:shadow-outline"
1919
id="name" type="text">
2020
</div>
2121

2222
<div class="mb-4">
23-
<label class="block text-gray-700 text-sm font-bold mb-2" for="email">
23+
<label class="block mb-2 text-sm font-bold text-gray-700" for="email">
2424
E-mail
2525
</label>
2626
<input v-model="form.email"
27-
class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
27+
class="w-full px-3 py-2 leading-tight text-gray-700 border rounded shadow appearance-none focus:outline-none focus:shadow-outline"
2828
id="email" type="email">
2929
</div>
3030

3131
<div class="flex items-center justify-between">
3232
<Button :form="form"></Button>
3333
</div>
3434
</form>
35-
<p class="text-center text-gray-500 text-xs">
36-
&copy;2022 - <a class="text-blue-500" href="https://github.com/perisicnikola37"
37-
target="_blank">@perisicnikola37</a>
35+
<p class="text-xs text-center text-gray-500">
36+
&copy; {{ $page.props.currentYear }} - <a class="text-blue-500"
37+
href="https://github.com/perisicnikola37" target="_blank">@{{ $page.props.username }}</a>
3838
</p>
3939
</div>
4040

@@ -44,9 +44,9 @@
4444
</template>
4545

4646
<script>
47-
import AppLayout from '@/Layouts/AppLayout.vue';
4847
import Breadcrumb from "@/Components/Breadcrumb.vue";
4948
import Button from "@/Components/Button.vue";
49+
import AppLayout from '@/Layouts/AppLayout.vue';
5050
5151
export default {
5252
components: {

0 commit comments

Comments
 (0)