Skip to content

Commit

Permalink
Merge pull request #84 from balajidharma/2.x-Changes
Browse files Browse the repository at this point in the history
2.x changes
  • Loading branch information
balajidharma authored Aug 13, 2024
2 parents 5cea12b + da21ad0 commit ddbb433
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 38 deletions.
1 change: 0 additions & 1 deletion app/Forms/Admin/RoleForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ public function buildForm()
'choices' => $permissions->pluck('name', 'name')->toArray(),
'choice_options' => [
'wrapper' => ['class' => 'col-span-4 sm:col-span-2 md:col-span-1'],
'label_attr' => ['class' => 'label-text'],
],
'choices_wrapper' => ['class' => 'grid grid-cols-4 gap-4'],
'label' => __('Permissions'),
Expand Down
1 change: 0 additions & 1 deletion app/Forms/Admin/UserForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ public function buildForm()
'choices' => $roles->pluck('name', 'name')->toArray(),
'choice_options' => [
'wrapper' => ['class' => 'col-span-4 sm:col-span-2 md:col-span-1'],
'label_attr' => ['class' => 'label-class'],
],
'choices_wrapper' => ['class' => 'grid grid-cols-4 gap-4'],
'label' => __('Roles'),
Expand Down
42 changes: 23 additions & 19 deletions config/auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
| Authentication Defaults
|--------------------------------------------------------------------------
|
| This option controls the default authentication "guard" and password
| reset options for your application. You may change these defaults
| This option defines the default authentication "guard" and password
| reset "broker" for your application. You may change these values
| as required, but they're a perfect start for most applications.
|
*/

'defaults' => [
'guard' => 'web',
'passwords' => 'users',
'guard' => env('AUTH_GUARD', 'web'),
'passwords' => env('AUTH_PASSWORD_BROKER', 'users'),
],

/*
Expand All @@ -25,11 +25,11 @@
|
| Next, you may define every authentication guard for your application.
| Of course, a great default configuration has been defined for you
| here which uses session storage and the Eloquent user provider.
| which utilizes session storage plus the Eloquent user provider.
|
| All authentication drivers have a user provider. This defines how the
| All authentication guards have a user provider, which defines how the
| users are actually retrieved out of your database or other storage
| mechanisms used by this application to persist your user's data.
| system used by the application. Typically, Eloquent is utilized.
|
| Supported: "session"
|
Expand All @@ -47,12 +47,12 @@
| User Providers
|--------------------------------------------------------------------------
|
| All authentication drivers have a user provider. This defines how the
| All authentication guards have a user provider, which defines how the
| users are actually retrieved out of your database or other storage
| mechanisms used by this application to persist your user's data.
| system used by the application. Typically, Eloquent is utilized.
|
| If you have multiple user tables or models you may configure multiple
| sources which represent each model / table. These sources may then
| providers to represent the model / table. These providers may then
| be assigned to any extra authentication guards you have defined.
|
| Supported: "database", "eloquent"
Expand All @@ -62,7 +62,7 @@
'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => App\Models\User::class,
'model' => env('AUTH_MODEL', App\Models\User::class),
],

// 'users' => [
Expand All @@ -76,20 +76,24 @@
| Resetting Passwords
|--------------------------------------------------------------------------
|
| You may specify multiple password reset configurations if you have more
| than one user table or model in the application and you want to have
| separate password reset settings based on the specific user types.
| These configuration options specify the behavior of Laravel's password
| reset functionality, including the table utilized for token storage
| and the user provider that is invoked to actually retrieve users.
|
| The expire time is the number of minutes that the reset token should be
| The expiry time is the number of minutes that each reset token will be
| considered valid. This security feature keeps tokens short-lived so
| they have less time to be guessed. You may change this as needed.
|
| The throttle setting is the number of seconds a user must wait before
| generating more password reset tokens. This prevents the user from
| quickly generating a very large amount of password reset tokens.
|
*/

'passwords' => [
'users' => [
'provider' => 'users',
'table' => 'password_resets',
'table' => env('AUTH_PASSWORD_RESET_TOKEN_TABLE', 'password_reset_tokens'),
'expire' => 60,
'throttle' => 60,
],
Expand All @@ -101,11 +105,11 @@
|--------------------------------------------------------------------------
|
| Here you may define the amount of seconds before a password confirmation
| times out and the user is prompted to re-enter their password via the
| window expires and users are asked to re-enter their password via the
| confirmation screen. By default, the timeout lasts for three hours.
|
*/

'password_timeout' => 10800,
'password_timeout' => env('AUTH_PASSWORD_TIMEOUT', 10800),

];
];
2 changes: 1 addition & 1 deletion config/form-builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
'field_class' => 'btn btn-primary px-6',
],
'checkbox' => [
'label_class' => 'label-text',
'label_class' => 'label-text cursor-pointer',
'field_class' => 'checkbox',
],
],
Expand Down
34 changes: 18 additions & 16 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,31 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
>
<testsuites>
<testsuite name="Unit">
<directory suffix="Test.php">./tests/Unit</directory>
<directory>tests/Unit</directory>
</testsuite>
<testsuite name="Feature">
<directory suffix="Test.php">./tests/Feature</directory>
<directory>tests/Feature</directory>
</testsuite>
</testsuites>
<coverage processUncoveredFiles="true">
<source>
<include>
<directory suffix=".php">./app</directory>
<directory>app</directory>
</include>
</coverage>
</source>
<php>
<server name="APP_ENV" value="testing"/>
<server name="BCRYPT_ROUNDS" value="4"/>
<server name="CACHE_DRIVER" value="array"/>
<!-- <server name="DB_CONNECTION" value="sqlite"/> -->
<!-- <server name="DB_DATABASE" value=":memory:"/> -->
<server name="MAIL_MAILER" value="array"/>
<server name="QUEUE_CONNECTION" value="sync"/>
<server name="SESSION_DRIVER" value="array"/>
<server name="TELESCOPE_ENABLED" value="false"/>
<env name="APP_ENV" value="testing"/>
<env name="APP_MAINTENANCE_DRIVER" value="file"/>
<env name="BCRYPT_ROUNDS" value="4"/>
<env name="CACHE_STORE" value="array"/>
<!-- <env name="DB_CONNECTION" value="sqlite"/> -->
<!-- <env name="DB_DATABASE" value=":memory:"/> -->
<env name="MAIL_MAILER" value="array"/>
<env name="PULSE_ENABLED" value="false"/>
<env name="QUEUE_CONNECTION" value="sync"/>
<env name="SESSION_DRIVER" value="array"/>
<env name="TELESCOPE_ENABLED" value="false"/>
</php>
</phpunit>
</phpunit>

0 comments on commit ddbb433

Please sign in to comment.