-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from 3m1n3nc3/features
Add support for transaction note
- Loading branch information
Showing
13 changed files
with
272 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,19 @@ | ||
<?php | ||
|
||
// config for HPWebdeveloper/LaravelPayPocket | ||
return [ | ||
|
||
/** | ||
* The 'log_reference_generator' should be a numeric array with three elements: | ||
* - The first element should be the fully qualified name of a class that contains static methods. | ||
* This includes the namespace of the class. | ||
* - The second element should be the name of a static method available in the specified class. | ||
* - The third element should be an array of optional parameters to pass to the static method. | ||
* For example, the default generator is configured as follows: | ||
* [\Illuminate\Support\Str::class, 'random', [12]], which uses the 'random' static method | ||
* from the \Illuminate\Support\Str class with 12 as a parameter. | ||
*/ | ||
return [ | ||
'log_reference_length' => 12, | ||
'log_reference_prefix' => null, | ||
'log_reference_generator' => null, | ||
]; |
38 changes: 38 additions & 0 deletions
38
database/migrations/add_notes_and_reference_columns_to_wallets_logs_table.php.stub
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
return new class extends Migration | ||
{ | ||
/** | ||
* Run the migrations. | ||
*/ | ||
public function up(): void | ||
{ | ||
Schema::table('wallets_logs', function (Blueprint $table) { | ||
if (!Schema::hasColumn('wallets_logs', 'notes')) { | ||
$table->string('notes')->nullable()->after('status'); | ||
} | ||
if (!Schema::hasColumn('wallets_logs', 'reference')) { | ||
$table->string('reference')->nullable()->after('ip'); | ||
} | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
*/ | ||
public function down(): void | ||
{ | ||
Schema::table('wallets_logs', function (Blueprint $table) { | ||
if (Schema::hasColumn('wallets_logs', 'notes')) { | ||
$table->dropColumn('notes'); | ||
} | ||
if (Schema::hasColumn('wallets_logs', 'reference')) { | ||
$table->dropColumn('reference'); | ||
} | ||
}); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.