Skip to content

Commit b9279e1

Browse files
Merge branch 'main' into demo
2 parents 0e19c2c + 978f4e4 commit b9279e1

16 files changed

+1288
-18
lines changed

Diff for: .github/workflows/deploy-demo.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ jobs:
99
steps:
1010
- uses: shivammathur/setup-php@v2
1111
with:
12-
php-version: '8.1'
12+
php-version: '8.3'
1313
- uses: actions/checkout@v2
1414
- uses: actions/setup-node@v3
1515
with:
16-
node-version: 16
16+
node-version: 20
1717
- uses: mirromutth/[email protected]
1818
with:
1919
mysql database: laravel-test-db

Diff for: .github/workflows/deploy-main.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ jobs:
99
steps:
1010
- uses: shivammathur/setup-php@v2
1111
with:
12-
php-version: '8.1'
12+
php-version: '8.3'
1313
- uses: actions/checkout@v2
1414
- uses: actions/setup-node@v3
1515
with:
16-
node-version: 16
16+
node-version: 20
1717
- uses: mirromutth/[email protected]
1818
with:
1919
mysql database: laravel-test-db

Diff for: backend/src/store/actions.js

+3
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,9 @@ export function updateCustomer({commit}, customer) {
185185
export function deleteCustomer({commit}, customer) {
186186
return axiosClient.delete(`/customers/${customer.id}`)
187187
}
188+
export function deleteUser({commit}, user) {
189+
return axiosClient.delete(`/users/${user.id}`)
190+
}
188191

189192
export function getCategories({commit, state}, {sort_field, sort_direction} = {}) {
190193
commit('setCategories', [true])

Diff for: backend/src/views/Categories/CategoryModal.vue

+7-7
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,6 @@ import CustomInput from "../../components/core/CustomInput.vue";
8181
import store from "../../store/index.js";
8282
import Spinner from "../../components/core/Spinner.vue";
8383

84-
const category = ref({
85-
id: props.category.id,
86-
name: props.category.name,
87-
active: props.category.active,
88-
parent_id: props.category.parent_id,
89-
})
90-
9184
const loading = ref(false)
9285
const errors = ref({})
9386

@@ -98,6 +91,13 @@ const props = defineProps({
9891
type: Object,
9992
}
10093
})
94+
95+
const category = ref({
96+
id: props.category.id,
97+
name: props.category.name,
98+
active: props.category.active,
99+
parent_id: props.category.parent_id,
100+
})
101101

102102
const emit = defineEmits(['update:modelValue', 'close'])
103103

Diff for: backend/src/views/Users/UserModal.vue

+8-7
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,14 @@ import CustomInput from "../../components/core/CustomInput.vue";
7777
import store from "../../store/index.js";
7878
import Spinner from "../../components/core/Spinner.vue";
7979

80+
const props = defineProps({
81+
modelValue: Boolean,
82+
user: {
83+
required: true,
84+
type: Object,
85+
}
86+
})
87+
8088
const user = ref({
8189
id: props.user.id,
8290
name: props.user.name,
@@ -85,13 +93,6 @@ const user = ref({
8593

8694
const loading = ref(false)
8795

88-
const props = defineProps({
89-
modelValue: Boolean,
90-
user: {
91-
required: true,
92-
type: Object,
93-
}
94-
})
9596

9697
const emit = defineEmits(['update:modelValue', 'close'])
9798

Diff for: config/app.php

+161
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
<?php
2+
3+
use Illuminate\Support\Facades\Facade;
4+
5+
return [
6+
7+
/*
8+
|--------------------------------------------------------------------------
9+
| Application Name
10+
|--------------------------------------------------------------------------
11+
|
12+
| This value is the name of your application. This value is used when the
13+
| framework needs to place the application's name in a notification or
14+
| any other location as required by the application or its packages.
15+
|
16+
*/
17+
18+
'name' => env('APP_NAME', 'Laravel'),
19+
20+
/*
21+
|--------------------------------------------------------------------------
22+
| Application Environment
23+
|--------------------------------------------------------------------------
24+
|
25+
| This value determines the "environment" your application is currently
26+
| running in. This may determine how you prefer to configure various
27+
| services the application utilizes. Set this in your ".env" file.
28+
|
29+
*/
30+
31+
'env' => env('APP_ENV', 'production'),
32+
33+
/*
34+
|--------------------------------------------------------------------------
35+
| Application Debug Mode
36+
|--------------------------------------------------------------------------
37+
|
38+
| When your application is in debug mode, detailed error messages with
39+
| stack traces will be shown on every error that occurs within your
40+
| application. If disabled, a simple generic error page is shown.
41+
|
42+
*/
43+
44+
'debug' => (bool) env('APP_DEBUG', false),
45+
46+
/*
47+
|--------------------------------------------------------------------------
48+
| Application URL
49+
|--------------------------------------------------------------------------
50+
|
51+
| This URL is used by the console to properly generate URLs when using
52+
| the Artisan command line tool. You should set this to the root of
53+
| your application so that it is used when running Artisan tasks.
54+
|
55+
*/
56+
57+
'url' => env('APP_URL', 'http://localhost'),
58+
59+
'asset_url' => env('ASSET_URL'),
60+
61+
/*
62+
|--------------------------------------------------------------------------
63+
| Application Timezone
64+
|--------------------------------------------------------------------------
65+
|
66+
| Here you may specify the default timezone for your application, which
67+
| will be used by the PHP date and date-time functions. We have gone
68+
| ahead and set this to a sensible default for you out of the box.
69+
|
70+
*/
71+
72+
'timezone' => 'UTC',
73+
74+
/*
75+
|--------------------------------------------------------------------------
76+
| Application Locale Configuration
77+
|--------------------------------------------------------------------------
78+
|
79+
| The application locale determines the default locale that will be used
80+
| by the translation service provider. You are free to set this value
81+
| to any of the locales which will be supported by the application.
82+
|
83+
*/
84+
85+
'locale' => 'en',
86+
87+
/*
88+
|--------------------------------------------------------------------------
89+
| Application Fallback Locale
90+
|--------------------------------------------------------------------------
91+
|
92+
| The fallback locale determines the locale to use when the current one
93+
| is not available. You may change the value to correspond to any of
94+
| the language folders that are provided through your application.
95+
|
96+
*/
97+
98+
'fallback_locale' => 'en',
99+
100+
/*
101+
|--------------------------------------------------------------------------
102+
| Faker Locale
103+
|--------------------------------------------------------------------------
104+
|
105+
| This locale will be used by the Faker PHP library when generating fake
106+
| data for your database seeds. For example, this will be used to get
107+
| localized telephone numbers, street address information and more.
108+
|
109+
*/
110+
111+
'faker_locale' => 'en_US',
112+
113+
/*
114+
|--------------------------------------------------------------------------
115+
| Encryption Key
116+
|--------------------------------------------------------------------------
117+
|
118+
| This key is used by the Illuminate encrypter service and should be set
119+
| to a random, 32 character string, otherwise these encrypted strings
120+
| will not be safe. Please do this before deploying an application!
121+
|
122+
*/
123+
124+
'key' => env('APP_KEY'),
125+
126+
'cipher' => 'AES-256-CBC',
127+
128+
/*
129+
|--------------------------------------------------------------------------
130+
| Maintenance Mode Driver
131+
|--------------------------------------------------------------------------
132+
|
133+
| These configuration options determine the driver used to determine and
134+
| manage Laravel's "maintenance mode" status. The "cache" driver will
135+
| allow maintenance mode to be controlled across multiple machines.
136+
|
137+
| Supported drivers: "file", "cache"
138+
|
139+
*/
140+
141+
'maintenance' => [
142+
'driver' => 'file',
143+
// 'store' => 'redis',
144+
],
145+
146+
/*
147+
|--------------------------------------------------------------------------
148+
| Class Aliases
149+
|--------------------------------------------------------------------------
150+
|
151+
| This array of class aliases will be registered when this application
152+
| is started. However, feel free to register as many as you wish as
153+
| the aliases are "lazy" loaded so they don't hinder performance.
154+
|
155+
*/
156+
157+
'aliases' => Facade::defaultAliases()->merge([
158+
// 'ExampleClass' => App\Example\ExampleClass::class,
159+
])->toArray(),
160+
161+
];

Diff for: config/auth.php

+111
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
<?php
2+
3+
return [
4+
5+
/*
6+
|--------------------------------------------------------------------------
7+
| Authentication Defaults
8+
|--------------------------------------------------------------------------
9+
|
10+
| This option controls the default authentication "guard" and password
11+
| reset options for your application. You may change these defaults
12+
| as required, but they're a perfect start for most applications.
13+
|
14+
*/
15+
16+
'defaults' => [
17+
'guard' => 'web',
18+
'passwords' => 'users',
19+
],
20+
21+
/*
22+
|--------------------------------------------------------------------------
23+
| Authentication Guards
24+
|--------------------------------------------------------------------------
25+
|
26+
| Next, you may define every authentication guard for your application.
27+
| Of course, a great default configuration has been defined for you
28+
| here which uses session storage and the Eloquent user provider.
29+
|
30+
| All authentication drivers have a user provider. This defines how the
31+
| users are actually retrieved out of your database or other storage
32+
| mechanisms used by this application to persist your user's data.
33+
|
34+
| Supported: "session"
35+
|
36+
*/
37+
38+
'guards' => [
39+
'web' => [
40+
'driver' => 'session',
41+
'provider' => 'users',
42+
],
43+
],
44+
45+
/*
46+
|--------------------------------------------------------------------------
47+
| User Providers
48+
|--------------------------------------------------------------------------
49+
|
50+
| All authentication drivers have a user provider. This defines how the
51+
| users are actually retrieved out of your database or other storage
52+
| mechanisms used by this application to persist your user's data.
53+
|
54+
| If you have multiple user tables or models you may configure multiple
55+
| sources which represent each model / table. These sources may then
56+
| be assigned to any extra authentication guards you have defined.
57+
|
58+
| Supported: "database", "eloquent"
59+
|
60+
*/
61+
62+
'providers' => [
63+
'users' => [
64+
'driver' => 'eloquent',
65+
'model' => App\Models\User::class,
66+
],
67+
68+
// 'users' => [
69+
// 'driver' => 'database',
70+
// 'table' => 'users',
71+
// ],
72+
],
73+
74+
/*
75+
|--------------------------------------------------------------------------
76+
| Resetting Passwords
77+
|--------------------------------------------------------------------------
78+
|
79+
| You may specify multiple password reset configurations if you have more
80+
| than one user table or model in the application and you want to have
81+
| separate password reset settings based on the specific user types.
82+
|
83+
| The expire time is the number of minutes that each reset token will be
84+
| considered valid. This security feature keeps tokens short-lived so
85+
| they have less time to be guessed. You may change this as needed.
86+
|
87+
*/
88+
89+
'passwords' => [
90+
'users' => [
91+
'provider' => 'users',
92+
'table' => 'password_resets',
93+
'expire' => 60,
94+
'throttle' => 60,
95+
],
96+
],
97+
98+
/*
99+
|--------------------------------------------------------------------------
100+
| Password Confirmation Timeout
101+
|--------------------------------------------------------------------------
102+
|
103+
| Here you may define the amount of seconds before a password confirmation
104+
| times out and the user is prompted to re-enter their password via the
105+
| confirmation screen. By default, the timeout lasts for three hours.
106+
|
107+
*/
108+
109+
'password_timeout' => 10800,
110+
111+
];

Diff for: config/cache.php

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
3+
use Illuminate\Support\Str;
4+
5+
return [
6+
7+
/*
8+
|--------------------------------------------------------------------------
9+
| Default Cache Store
10+
|--------------------------------------------------------------------------
11+
|
12+
| This option controls the default cache connection that gets used while
13+
| using this caching library. This connection is used when another is
14+
| not explicitly specified when executing a given caching function.
15+
|
16+
*/
17+
18+
'default' => env('CACHE_DRIVER', 'file'),
19+
20+
];

0 commit comments

Comments
 (0)