paymenr order
This commit is contained in:
25885
_ide_helper.php
Normal file
25885
_ide_helper.php
Normal file
File diff suppressed because it is too large
Load Diff
BIN
app/.DS_Store
vendored
BIN
app/.DS_Store
vendored
Binary file not shown.
128
app/Filament/Resources/PaymentOrder/PaymentOrderResource.php
Normal file
128
app/Filament/Resources/PaymentOrder/PaymentOrderResource.php
Normal file
@@ -0,0 +1,128 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\PaymentOrder;
|
||||
|
||||
use App\Filament\Resources\PaymentOrder\PaymentOrderResource\Pages;
|
||||
use App\Modules\PaymentOrder\Models\PaymentOrder;
|
||||
use Filament\Forms\Components\Fieldset;
|
||||
use Filament\Forms\Components\Textarea;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Tables;
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Tables\Table;
|
||||
|
||||
class PaymentOrderResource extends Resource
|
||||
{
|
||||
protected static ?string $model = PaymentOrder::class;
|
||||
|
||||
protected static ?string $navigationIcon = 'heroicon-o-receipt-percent';
|
||||
|
||||
public static function form(Form $form): Form
|
||||
{
|
||||
return $form
|
||||
->schema([
|
||||
Fieldset::make(__('Töleg'))
|
||||
->schema([
|
||||
TextInput::make('number')
|
||||
->integer()
|
||||
->required(),
|
||||
|
||||
TextInput::make('money_amount')
|
||||
->required()
|
||||
->label('Pul mocberi'),
|
||||
|
||||
TextInput::make('bank_code')
|
||||
->required()
|
||||
->label('Bank topary'),
|
||||
|
||||
TextInput::make('payment_reason_number')
|
||||
->integer()
|
||||
->required()
|
||||
->label('Toleg maksady nomeri'),
|
||||
|
||||
Textarea::make('payment_reason_description')
|
||||
->label('Toleg maksady')
|
||||
->autosize(),
|
||||
]),
|
||||
|
||||
Fieldset::make('Toleyji')
|
||||
->schema([
|
||||
TextInput::make('t_name')
|
||||
->label('ady familyasy'),
|
||||
|
||||
TextInput::make('t_ssb')
|
||||
->label('ŞSB'),
|
||||
|
||||
TextInput::make('t_bab')
|
||||
->label('BAB'),
|
||||
|
||||
TextInput::make('t_bank')
|
||||
->label('Banky'),
|
||||
|
||||
TextInput::make('t_hb_1')
|
||||
->label('H/b 1'),
|
||||
|
||||
TextInput::make('t_hb_2')
|
||||
->label('H/b 2'),
|
||||
]),
|
||||
|
||||
Fieldset::make('Alyjy')
|
||||
->schema([
|
||||
TextInput::make('a_name')
|
||||
->label('ady familyasy'),
|
||||
|
||||
TextInput::make('a_ssb')
|
||||
->label('ŞSB'),
|
||||
|
||||
TextInput::make('a_bab')
|
||||
->label('BAB'),
|
||||
|
||||
TextInput::make('a_bank')
|
||||
->label('Banky'),
|
||||
|
||||
TextInput::make('a_hb_1')
|
||||
->label('H/b 1'),
|
||||
|
||||
TextInput::make('a_hb_2')
|
||||
->label('H/b 2'),
|
||||
]),
|
||||
]);
|
||||
}
|
||||
|
||||
public static function table(Table $table): Table
|
||||
{
|
||||
return $table
|
||||
->columns([
|
||||
TextColumn::make('number'),
|
||||
])
|
||||
->filters([
|
||||
//
|
||||
])
|
||||
->actions([
|
||||
Tables\Actions\EditAction::make(),
|
||||
])
|
||||
->bulkActions([
|
||||
Tables\Actions\BulkActionGroup::make([
|
||||
Tables\Actions\DeleteBulkAction::make(),
|
||||
]),
|
||||
]);
|
||||
}
|
||||
|
||||
public static function getRelations(): array
|
||||
{
|
||||
return [
|
||||
//
|
||||
];
|
||||
}
|
||||
|
||||
public static function getPages(): array
|
||||
{
|
||||
return [
|
||||
'index' => Pages\ListPaymentOrders::route('/'),
|
||||
'create' => Pages\CreatePaymentOrder::route('/create'),
|
||||
'edit' => Pages\EditPaymentOrder::route('/{record}/edit'),
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\PaymentOrder\PaymentOrderResource\Pages;
|
||||
|
||||
use App\Filament\Resources\PaymentOrder\PaymentOrderResource;
|
||||
use Filament\Resources\Pages\CreateRecord;
|
||||
|
||||
class CreatePaymentOrder extends CreateRecord
|
||||
{
|
||||
protected static string $resource = PaymentOrderResource::class;
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\PaymentOrder\PaymentOrderResource\Pages;
|
||||
|
||||
use App\Filament\Resources\PaymentOrder\PaymentOrderResource;
|
||||
use Carbon\Carbon;
|
||||
use Filament\Actions;
|
||||
use Filament\Actions\Action;
|
||||
use Filament\Resources\Pages\EditRecord;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Support\Str;
|
||||
use PhpOffice\PhpWord\TemplateProcessor;
|
||||
|
||||
class EditPaymentOrder extends EditRecord
|
||||
{
|
||||
protected static string $resource = PaymentOrderResource::class;
|
||||
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
Actions\DeleteAction::make(),
|
||||
Action::make('sendEmail')
|
||||
->action(function (array $data) {
|
||||
$paymentOrder = $this->getRecord();
|
||||
|
||||
Carbon::setLocale('tk');
|
||||
|
||||
$orderNumber = 1;
|
||||
$date_written_turkmen = sprintf(
|
||||
'%s -nji(y) ýylyň %s aýynyň %s',
|
||||
$paymentOrder->created_at->year,
|
||||
Str::lower($paymentOrder->created_at->translatedFormat('F')),
|
||||
$paymentOrder->created_at->format('d')
|
||||
);
|
||||
|
||||
$templateProcessor = new TemplateProcessor(modules_path('PaymentOrder/Resources/Docs/orders.docx'));
|
||||
$templateProcessor->setValues([
|
||||
'n' => $paymentOrder->number,
|
||||
|
||||
'date_written_turkmen' => $date_written_turkmen,
|
||||
'p_date' => $paymentOrder->created_at->format('Y-m-d'),
|
||||
|
||||
'money_amount' => $paymentOrder->money_amount,
|
||||
|
||||
// Bank topary
|
||||
'b_nm' => $paymentOrder->bank_code,
|
||||
|
||||
't_name' => $paymentOrder->t_name,
|
||||
't_ssb' => $paymentOrder->t_ssb,
|
||||
't_bab' => $paymentOrder->t_bab,
|
||||
't_bank' => $paymentOrder->t_bank,
|
||||
't_hb_1' => $paymentOrder->t_hb_1,
|
||||
't_hb_2' => $paymentOrder->t_hb_2,
|
||||
|
||||
'a_name' => $paymentOrder->a_name,
|
||||
'a_ssb' => $paymentOrder->a_ssb,
|
||||
'a_bab' => $paymentOrder->a_bab,
|
||||
'a_bank' => $paymentOrder->a_bank,
|
||||
'a_hb_1' => $paymentOrder->a_hb_1,
|
||||
'a_hb_2' => $paymentOrder->a_hb_2,
|
||||
]);
|
||||
|
||||
$pathToSave = storage_path('app/private/ok.docx');
|
||||
$templateProcessor->saveAs($pathToSave);
|
||||
|
||||
return Storage::disk('private')->download('ok.docx');
|
||||
}),
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\PaymentOrder\PaymentOrderResource\Pages;
|
||||
|
||||
use App\Filament\Resources\PaymentOrder\PaymentOrderResource;
|
||||
use Filament\Actions;
|
||||
use Filament\Resources\Pages\ListRecords;
|
||||
|
||||
class ListPaymentOrders extends ListRecords
|
||||
{
|
||||
protected static string $resource = PaymentOrderResource::class;
|
||||
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
Actions\CreateAction::make(),
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -113,8 +113,6 @@ function logDB(): void
|
||||
|
||||
/**
|
||||
* Get latest number
|
||||
*
|
||||
* @param string $tableName
|
||||
*/
|
||||
function getLatestNumber(string $tableName = 'incoming_letters', string $column = 'number'): int
|
||||
{
|
||||
@@ -122,3 +120,4 @@ function getLatestNumber(string $tableName = 'incoming_letters', string $column
|
||||
|
||||
return intval($data->max_number) ?? 0;
|
||||
}
|
||||
|
||||
|
||||
BIN
app/Modules/.DS_Store
vendored
BIN
app/Modules/.DS_Store
vendored
Binary file not shown.
BIN
app/Modules/PaymentOrder/.DS_Store
vendored
Normal file
BIN
app/Modules/PaymentOrder/.DS_Store
vendored
Normal file
Binary file not shown.
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
namespace App\Modules\PaymentOrder\Controllers;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class PaymentOrderController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*/
|
||||
public function index(Request $request): void
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*/
|
||||
public function store(Request $request): void
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*/
|
||||
public function show(Request $request): void
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*/
|
||||
public function update(Request $request): void
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*/
|
||||
public function destroy(Request $request): void
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
<?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::create('payment_orders', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('number')->nullable();
|
||||
$table->string('money_amount')->nullable();
|
||||
$table->string('payment_reason_number')->nullable();
|
||||
$table->text('payment_reason_description')->nullable();
|
||||
$table->string('bank_code')->nullable();
|
||||
|
||||
$table->string('t_name')->nullable();
|
||||
$table->string('t_ssb')->nullable();
|
||||
$table->string('t_bab')->nullable();
|
||||
$table->string('t_bank')->nullable();
|
||||
$table->string('t_hb_1')->nullable();
|
||||
$table->string('t_hb_2')->nullable();
|
||||
|
||||
$table->string('a_name')->nullable();
|
||||
$table->string('a_ssb')->nullable();
|
||||
$table->string('a_bab')->nullable();
|
||||
$table->string('a_bank')->nullable();
|
||||
$table->string('a_hb_1')->nullable();
|
||||
$table->string('a_hb_2')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('payment_orders');
|
||||
}
|
||||
};
|
||||
7
app/Modules/PaymentOrder/Models/PaymentOrder.php
Normal file
7
app/Modules/PaymentOrder/Models/PaymentOrder.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace App\Modules\PaymentOrder\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class PaymentOrder extends Model {}
|
||||
48
app/Modules/PaymentOrder/PaymentOrderModule.php
Normal file
48
app/Modules/PaymentOrder/PaymentOrderModule.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
namespace App\Modules\PaymentOrder;
|
||||
|
||||
use App\Modules\Makeable;
|
||||
use App\Modules\ModuleContract;
|
||||
|
||||
class PaymentOrderModule implements ModuleContract
|
||||
{
|
||||
use Makeable;
|
||||
|
||||
/**
|
||||
* Module is enabled
|
||||
*/
|
||||
protected bool $enabled = true;
|
||||
|
||||
/**
|
||||
* Check if is module enabled
|
||||
*/
|
||||
public function isEnabled(): bool
|
||||
{
|
||||
return $this->enabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Disable module
|
||||
*/
|
||||
public function disable(): void
|
||||
{
|
||||
$this->enabled = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable module
|
||||
*/
|
||||
public function enable(): void
|
||||
{
|
||||
$this->enabled = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if module has a filament resource
|
||||
*/
|
||||
public function hasFilamentResource(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace App\Modules\PaymentOrder\Repositories;
|
||||
|
||||
class PaymentOrderRepository {}
|
||||
BIN
app/Modules/PaymentOrder/Resources/.DS_Store
vendored
Normal file
BIN
app/Modules/PaymentOrder/Resources/.DS_Store
vendored
Normal file
Binary file not shown.
BIN
app/Modules/PaymentOrder/Resources/Docs/orders.docx
Normal file
BIN
app/Modules/PaymentOrder/Resources/Docs/orders.docx
Normal file
Binary file not shown.
BIN
app/Modules/PaymentOrder/Resources/Docs/~$orders.docx
Normal file
BIN
app/Modules/PaymentOrder/Resources/Docs/~$orders.docx
Normal file
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,110 @@
|
||||
<?php
|
||||
|
||||
namespace App\Modules\TurkmenNumberFormatter\Repositories;
|
||||
|
||||
class TurkmenNumberFormatter
|
||||
{
|
||||
// Define number mappings
|
||||
private static $units = ['', 'bir', 'iki', 'üç', 'dört', 'bäş', 'alty', 'ýedi', 'sekiz', 'dokuz'];
|
||||
|
||||
private static $tens = ['', 'on', 'ýigrimi', 'otuz', 'kyrk', 'elli', 'altmyş', 'ýetmiş', 'segsen', 'togsan'];
|
||||
|
||||
private static $hundreds = ['', 'ýüz', 'iki ýüz', 'üç ýüz', 'dört ýüz', 'bäş ýüz', 'alty ýüz', 'ýedi ýüz', 'sekiz ýüz', 'dokuz ýüz'];
|
||||
|
||||
private static $largeNumbers = ['', 'müň', 'million', 'milliard', 'trillion'];
|
||||
|
||||
/**
|
||||
* Main method to format a given amount in Turkmen.
|
||||
*
|
||||
* @param float $amount The amount to format.
|
||||
* @return string The amount in written Turkmen format.
|
||||
*/
|
||||
public static function format($amount)
|
||||
{
|
||||
// Split the amount into whole and fractional parts
|
||||
[$whole, $fraction] = explode('.', number_format($amount, 2, '.', ''));
|
||||
|
||||
// Convert the whole part
|
||||
$wholeWords = self::convertWholePart($whole);
|
||||
|
||||
// Convert the fractional part
|
||||
$fractionWords = self::convertFractionalPart($fraction);
|
||||
|
||||
return trim($wholeWords.' '.$fractionWords);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the whole part of the number.
|
||||
*
|
||||
* @param int $whole The whole part of the number.
|
||||
* @return string The converted whole part in Turkmen.
|
||||
*/
|
||||
private static function convertWholePart($whole)
|
||||
{
|
||||
$words = '';
|
||||
$level = 0;
|
||||
|
||||
while ($whole > 0) {
|
||||
$part = $whole % 1000;
|
||||
$whole = (int) ($whole / 1000);
|
||||
|
||||
if ($part > 0) {
|
||||
$words = self::convertToWords($part).' '.self::$largeNumbers[$level].' '.$words;
|
||||
}
|
||||
$level++;
|
||||
}
|
||||
|
||||
return trim($words).' manat';
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the fractional part of the number.
|
||||
*
|
||||
* @param int $fraction The fractional part of the number.
|
||||
* @return string The converted fractional part in Turkmen.
|
||||
*/
|
||||
private static function convertFractionalPart($fraction)
|
||||
{
|
||||
if ($fraction <= 0) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$fractionTens = (int) ($fraction / 10);
|
||||
$fractionUnits = $fraction % 10;
|
||||
|
||||
$words = '';
|
||||
$words .= ($fractionTens > 0 ? self::$tens[$fractionTens].' ' : '');
|
||||
$words .= ($fractionUnits > 0 ? self::$units[$fractionUnits].' ' : '');
|
||||
|
||||
return trim($words).' teňňe';
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a number up to 999 to Turkmen words.
|
||||
*
|
||||
* @param int $num The number to convert.
|
||||
* @return string The converted number in Turkmen.
|
||||
*/
|
||||
private static function convertToWords($num)
|
||||
{
|
||||
$words = '';
|
||||
|
||||
if ($num >= 100) {
|
||||
$hundredsPart = (int) ($num / 100);
|
||||
$num %= 100;
|
||||
$words .= self::$hundreds[$hundredsPart].' ';
|
||||
}
|
||||
|
||||
if ($num >= 10) {
|
||||
$tensPart = (int) ($num / 10);
|
||||
$num %= 10;
|
||||
$words .= self::$tens[$tensPart].' ';
|
||||
}
|
||||
|
||||
if ($num > 0) {
|
||||
$words .= self::$units[$num].' ';
|
||||
}
|
||||
|
||||
return trim($words);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
namespace App\Modules\TurkmenNumberFormatter;
|
||||
|
||||
use App\Modules\Makeable;
|
||||
use App\Modules\ModuleContract;
|
||||
|
||||
class TurkmenNumberFormatterModule implements ModuleContract
|
||||
{
|
||||
use Makeable;
|
||||
|
||||
/**
|
||||
* Module is enabled
|
||||
*/
|
||||
protected bool $enabled = true;
|
||||
|
||||
/**
|
||||
* Check if is module enabled
|
||||
*/
|
||||
public function isEnabled(): bool
|
||||
{
|
||||
return $this->enabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Disable module
|
||||
*/
|
||||
public function disable(): void
|
||||
{
|
||||
$this->enabled = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable module
|
||||
*/
|
||||
public function enable(): void
|
||||
{
|
||||
$this->enabled = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if module has a filament resource
|
||||
*/
|
||||
public function hasFilamentResource(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,7 @@
|
||||
"phpoffice/phpword": "^1.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"barryvdh/laravel-ide-helper": "^3.2",
|
||||
"fakerphp/faker": "^1.23",
|
||||
"larastan/larastan": "^2.0",
|
||||
"laravel/pail": "^1.1",
|
||||
|
||||
300
composer.lock
generated
300
composer.lock
generated
@@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "465dbb0b656bbc7be4534829c4a7d154",
|
||||
"content-hash": "8a4d84668f344ea1cf8145eb52a30343",
|
||||
"packages": [
|
||||
{
|
||||
"name": "anourvalar/eloquent-serialize",
|
||||
@@ -7616,6 +7616,152 @@
|
||||
}
|
||||
],
|
||||
"packages-dev": [
|
||||
{
|
||||
"name": "barryvdh/laravel-ide-helper",
|
||||
"version": "v3.2.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/barryvdh/laravel-ide-helper.git",
|
||||
"reference": "07e3bd8796f3d1414801a03d3783f9d3ec9efc08"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/barryvdh/laravel-ide-helper/zipball/07e3bd8796f3d1414801a03d3783f9d3ec9efc08",
|
||||
"reference": "07e3bd8796f3d1414801a03d3783f9d3ec9efc08",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"barryvdh/reflection-docblock": "^2.1.2",
|
||||
"composer/class-map-generator": "^1.0",
|
||||
"ext-json": "*",
|
||||
"illuminate/console": "^11.15",
|
||||
"illuminate/database": "^11.15",
|
||||
"illuminate/filesystem": "^11.15",
|
||||
"illuminate/support": "^11.15",
|
||||
"nikic/php-parser": "^4.18 || ^5",
|
||||
"php": "^8.2",
|
||||
"phpdocumentor/type-resolver": "^1.1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-pdo_sqlite": "*",
|
||||
"friendsofphp/php-cs-fixer": "^3",
|
||||
"illuminate/config": "^11.15",
|
||||
"illuminate/view": "^11.15",
|
||||
"mockery/mockery": "^1.4",
|
||||
"orchestra/testbench": "^9.2",
|
||||
"phpunit/phpunit": "^10.5",
|
||||
"spatie/phpunit-snapshot-assertions": "^4 || ^5",
|
||||
"vimeo/psalm": "^5.4"
|
||||
},
|
||||
"suggest": {
|
||||
"illuminate/events": "Required for automatic helper generation (^6|^7|^8|^9|^10|^11)."
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.2-dev"
|
||||
},
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider"
|
||||
]
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Barryvdh\\LaravelIdeHelper\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Barry vd. Heuvel",
|
||||
"email": "barryvdh@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.",
|
||||
"keywords": [
|
||||
"autocomplete",
|
||||
"codeintel",
|
||||
"helper",
|
||||
"ide",
|
||||
"laravel",
|
||||
"netbeans",
|
||||
"phpdoc",
|
||||
"phpstorm",
|
||||
"sublime"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/barryvdh/laravel-ide-helper/issues",
|
||||
"source": "https://github.com/barryvdh/laravel-ide-helper/tree/v3.2.2"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://fruitcake.nl",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/barryvdh",
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2024-10-29T14:00:16+00:00"
|
||||
},
|
||||
{
|
||||
"name": "barryvdh/reflection-docblock",
|
||||
"version": "v2.1.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/barryvdh/ReflectionDocBlock.git",
|
||||
"reference": "c6fad15f7c878be21650c51e1f841bca7e49752e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/barryvdh/ReflectionDocBlock/zipball/c6fad15f7c878be21650c51e1f841bca7e49752e",
|
||||
"reference": "c6fad15f7c878be21650c51e1f841bca7e49752e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^8.5.14|^9"
|
||||
},
|
||||
"suggest": {
|
||||
"dflydev/markdown": "~1.0",
|
||||
"erusev/parsedown": "~1.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.0.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"Barryvdh": [
|
||||
"src/"
|
||||
]
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Mike van Riel",
|
||||
"email": "mike.vanriel@naenius.com"
|
||||
}
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/barryvdh/ReflectionDocBlock/tree/v2.1.3"
|
||||
},
|
||||
"time": "2024-10-23T11:41:03+00:00"
|
||||
},
|
||||
{
|
||||
"name": "brianium/paratest",
|
||||
"version": "v7.6.0",
|
||||
@@ -7709,6 +7855,158 @@
|
||||
],
|
||||
"time": "2024-10-15T12:38:31+00:00"
|
||||
},
|
||||
{
|
||||
"name": "composer/class-map-generator",
|
||||
"version": "1.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/composer/class-map-generator.git",
|
||||
"reference": "98bbf6780e56e0fd2404fe4b82eb665a0f93b783"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/composer/class-map-generator/zipball/98bbf6780e56e0fd2404fe4b82eb665a0f93b783",
|
||||
"reference": "98bbf6780e56e0fd2404fe4b82eb665a0f93b783",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"composer/pcre": "^2.1 || ^3.1",
|
||||
"php": "^7.2 || ^8.0",
|
||||
"symfony/finder": "^4.4 || ^5.3 || ^6 || ^7"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpstan/phpstan": "^1.6",
|
||||
"phpstan/phpstan-deprecation-rules": "^1",
|
||||
"phpstan/phpstan-phpunit": "^1",
|
||||
"phpstan/phpstan-strict-rules": "^1.1",
|
||||
"phpunit/phpunit": "^8",
|
||||
"symfony/filesystem": "^5.4 || ^6"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "1.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Composer\\ClassMapGenerator\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Jordi Boggiano",
|
||||
"email": "j.boggiano@seld.be",
|
||||
"homepage": "https://seld.be"
|
||||
}
|
||||
],
|
||||
"description": "Utilities to scan PHP code and generate class maps.",
|
||||
"keywords": [
|
||||
"classmap"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/composer/class-map-generator/issues",
|
||||
"source": "https://github.com/composer/class-map-generator/tree/1.4.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://packagist.com",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/composer",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/composer/composer",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2024-10-03T18:14:00+00:00"
|
||||
},
|
||||
{
|
||||
"name": "composer/pcre",
|
||||
"version": "3.3.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/composer/pcre.git",
|
||||
"reference": "63aaeac21d7e775ff9bc9d45021e1745c97521c4"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/composer/pcre/zipball/63aaeac21d7e775ff9bc9d45021e1745c97521c4",
|
||||
"reference": "63aaeac21d7e775ff9bc9d45021e1745c97521c4",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.4 || ^8.0"
|
||||
},
|
||||
"conflict": {
|
||||
"phpstan/phpstan": "<1.11.10"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpstan/phpstan": "^1.11.10",
|
||||
"phpstan/phpstan-strict-rules": "^1.1",
|
||||
"phpunit/phpunit": "^8 || ^9"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "3.x-dev"
|
||||
},
|
||||
"phpstan": {
|
||||
"includes": [
|
||||
"extension.neon"
|
||||
]
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Composer\\Pcre\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Jordi Boggiano",
|
||||
"email": "j.boggiano@seld.be",
|
||||
"homepage": "http://seld.be"
|
||||
}
|
||||
],
|
||||
"description": "PCRE wrapping library that offers type-safe preg_* replacements.",
|
||||
"keywords": [
|
||||
"PCRE",
|
||||
"preg",
|
||||
"regex",
|
||||
"regular expression"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/composer/pcre/issues",
|
||||
"source": "https://github.com/composer/pcre/tree/3.3.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://packagist.com",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/composer",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/composer/composer",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2024-08-27T18:44:43+00:00"
|
||||
},
|
||||
{
|
||||
"name": "fakerphp/faker",
|
||||
"version": "v1.23.1",
|
||||
|
||||
@@ -37,6 +37,13 @@ return [
|
||||
'throw' => false,
|
||||
],
|
||||
|
||||
'private' => [
|
||||
'driver' => 'local',
|
||||
'root' => storage_path('app/private'),
|
||||
'serve' => true,
|
||||
'throw' => false,
|
||||
],
|
||||
|
||||
'public' => [
|
||||
'driver' => 'local',
|
||||
'root' => storage_path('app/public'),
|
||||
|
||||
314
config/ide-helper.php
Normal file
314
config/ide-helper.php
Normal file
@@ -0,0 +1,314 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Filename
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The default filename.
|
||||
|
|
||||
*/
|
||||
|
||||
'filename' => '_ide_helper.php',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Models filename
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The default filename for the models helper file.
|
||||
|
|
||||
*/
|
||||
|
||||
'models_filename' => '_ide_helper_models.php',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| PhpStorm meta filename
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| PhpStorm also supports the directory `.phpstorm.meta.php/` with arbitrary
|
||||
| files in it, should you need additional files for your project; e.g.
|
||||
| `.phpstorm.meta.php/laravel_ide_Helper.php'.
|
||||
|
|
||||
*/
|
||||
'meta_filename' => '.phpstorm.meta.php',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Fluent helpers
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Set to true to generate commonly used Fluent methods.
|
||||
|
|
||||
*/
|
||||
|
||||
'include_fluent' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Factory builders
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Set to true to generate factory generators for better factory()
|
||||
| method auto-completion.
|
||||
|
|
||||
| Deprecated for Laravel 8 or latest.
|
||||
|
|
||||
*/
|
||||
|
||||
'include_factory_builders' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Write model magic methods
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Set to false to disable write magic methods of model.
|
||||
|
|
||||
*/
|
||||
|
||||
'write_model_magic_where' => true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Write model external Eloquent builder methods
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Set to false to disable write external Eloquent builder methods.
|
||||
|
|
||||
*/
|
||||
|
||||
'write_model_external_builder_methods' => true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Write model relation count properties
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Set to false to disable writing of relation count properties to model DocBlocks.
|
||||
|
|
||||
*/
|
||||
|
||||
'write_model_relation_count_properties' => true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Write Eloquent model mixins
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This will add the necessary DocBlock mixins to the model class
|
||||
| contained in the Laravel framework. This helps the IDE with
|
||||
| auto-completion.
|
||||
|
|
||||
| Please be aware that this setting changes a file within the /vendor directory.
|
||||
|
|
||||
*/
|
||||
|
||||
'write_eloquent_model_mixins' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Helper files to include
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Include helper files. By default not included, but can be toggled with the
|
||||
| -- helpers (-H) option. Extra helper files can be included.
|
||||
|
|
||||
*/
|
||||
|
||||
'include_helpers' => false,
|
||||
|
||||
'helper_files' => [
|
||||
base_path().'/vendor/laravel/framework/src/Illuminate/Support/helpers.php',
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Model locations to include
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Define in which directories the ide-helper:models command should look
|
||||
| for models.
|
||||
|
|
||||
| glob patterns are supported to easier reach models in sub-directories,
|
||||
| e.g. `app/Services/* /Models` (without the space).
|
||||
|
|
||||
*/
|
||||
|
||||
'model_locations' => [
|
||||
'app',
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Models to ignore
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Define which models should be ignored.
|
||||
|
|
||||
*/
|
||||
|
||||
'ignored_models' => [
|
||||
// App\MyModel::class,
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Models hooks
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Define which hook classes you want to run for models to add custom information.
|
||||
|
|
||||
| Hooks should implement Barryvdh\LaravelIdeHelper\Contracts\ModelHookInterface.
|
||||
|
|
||||
*/
|
||||
|
||||
'model_hooks' => [
|
||||
// App\Support\IdeHelper\MyModelHook::class
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Extra classes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| These implementations are not really extended, but called with magic functions.
|
||||
|
|
||||
*/
|
||||
|
||||
'extra' => [
|
||||
'Eloquent' => ['Illuminate\Database\Eloquent\Builder', 'Illuminate\Database\Query\Builder'],
|
||||
'Session' => ['Illuminate\Session\Store'],
|
||||
],
|
||||
|
||||
'magic' => [],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Interface implementations
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| These interfaces will be replaced with the implementing class. Some interfaces
|
||||
| are detected by the helpers, others can be listed below.
|
||||
|
|
||||
*/
|
||||
|
||||
'interfaces' => [
|
||||
// App\MyInterface::class => App\MyImplementation::class,
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Support for camel cased models
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| There are some Laravel packages (such as Eloquence) that allow for accessing
|
||||
| Eloquent model properties via camel case, instead of snake case.
|
||||
|
|
||||
| Enabling this option will support these packages by saving all model
|
||||
| properties as camel case, instead of snake case.
|
||||
|
|
||||
| For example, normally you would see this:
|
||||
|
|
||||
| * @property \Illuminate\Support\Carbon $created_at
|
||||
| * @property \Illuminate\Support\Carbon $updated_at
|
||||
|
|
||||
| With this enabled, the properties will be this:
|
||||
|
|
||||
| * @property \Illuminate\Support\Carbon $createdAt
|
||||
| * @property \Illuminate\Support\Carbon $updatedAt
|
||||
|
|
||||
| Note, it is currently an all-or-nothing option.
|
||||
|
|
||||
*/
|
||||
'model_camel_case_properties' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Property casts
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Cast the given "real type" to the given "type".
|
||||
|
|
||||
*/
|
||||
'type_overrides' => [
|
||||
'integer' => 'int',
|
||||
'boolean' => 'bool',
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Include DocBlocks from classes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Include DocBlocks from classes to allow additional code inspection for
|
||||
| magic methods and properties.
|
||||
|
|
||||
*/
|
||||
'include_class_docblocks' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Force FQN usage
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Use the fully qualified (class) name in DocBlocks,
|
||||
| even if the class exists in the same namespace
|
||||
| or there is an import (use className) of the class.
|
||||
|
|
||||
*/
|
||||
'force_fqn' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Use generics syntax
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Use generics syntax within DocBlocks,
|
||||
| e.g. `Collection<User>` instead of `Collection|User[]`.
|
||||
|
|
||||
*/
|
||||
'use_generics_annotations' => true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Additional relation types
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Sometimes it's needed to create custom relation types. The key of the array
|
||||
| is the relationship method name. The value of the array is the fully-qualified
|
||||
| class name of the relationship, e.g. `'relationName' => RelationShipClass::class`.
|
||||
|
|
||||
*/
|
||||
'additional_relation_types' => [],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Additional relation return types
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When using custom relation types its possible for the class name to not contain
|
||||
| the proper return type of the relation. The key of the array is the relationship
|
||||
| method name. The value of the array is the return type of the relation ('many'
|
||||
| or 'morphTo').
|
||||
| e.g. `'relationName' => 'many'`.
|
||||
|
|
||||
*/
|
||||
'additional_relation_return_types' => [],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Run artisan commands after migrations to generate model helpers
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The specified commands should run after migrations are finished running.
|
||||
|
|
||||
*/
|
||||
'post_migrate' => [
|
||||
// 'ide-helper:models --nowrite',
|
||||
],
|
||||
|
||||
];
|
||||
BIN
storage/.DS_Store
vendored
Normal file
BIN
storage/.DS_Store
vendored
Normal file
Binary file not shown.
Reference in New Issue
Block a user