Файловый менеджер - Редактировать - /home/c7lekhnath/silverray.com.au/Modules/Language/database/seeders/68334/ClubPoint.tar
Назад
lang/.gitkeep 0000644 00000000000 15012240342 0007075 0 ustar 00 module.json 0000644 00000000346 15012240342 0006720 0 ustar 00 { "name": "ClubPoint", "alias": "clubpoint", "description": "", "keywords": [], "priority": 0, "providers": [ "Modules\\ClubPoint\\app\\Providers\\ClubPointServiceProvider" ], "files": [] } tests/Unit/.gitkeep 0000644 00000000000 15012240342 0010235 0 ustar 00 tests/Feature/.gitkeep 0000644 00000000000 15012240342 0010711 0 ustar 00 vite.config.js 0000644 00000001310 15012240342 0007301 0 ustar 00 import { defineConfig } from 'vite'; import laravel from 'laravel-vite-plugin'; export default defineConfig({ build: { outDir: '../../public/build-clubpoint', emptyOutDir: true, manifest: true, }, plugins: [ laravel({ publicDirectory: '../../public', buildDirectory: 'build-clubpoint', input: [ __dirname + '/resources/assets/sass/app.scss', __dirname + '/resources/assets/js/app.js' ], refresh: true, }), ], }); //export const paths = [ // 'Modules/$STUDLY_NAME$/resources/assets/sass/app.scss', // 'Modules/$STUDLY_NAME$/resources/assets/js/app.js', //]; wsus.json 0000644 00000000627 15012240342 0006436 0 ustar 00 { "name": "Club Point Addon", "is_default": true, "description": "This is Club Point Addon", "author": { "name": "Websolutionsus", "email": "websolutionus1@gmail.com", "website": "https://websolutionus.com" }, "license": "Proprietary", "url": "", "options" : { "route" : "home" }, "last_update": "2024-03-31", "version": "1.0.0" } routes/.gitkeep 0000644 00000000000 15012240342 0007475 0 ustar 00 routes/error_log 0000644 00000000444 15012240342 0007775 0 ustar 00 [08-May-2025 22:08:25 UTC] PHP Fatal error: Uncaught Error: Class "Illuminate\Support\Facades\Route" not found in /home/lekhnath/silverray.com.au/Modules/ClubPoint/routes/api.php:5 Stack trace: #0 {main} thrown in /home/lekhnath/silverray.com.au/Modules/ClubPoint/routes/api.php on line 5 routes/web.php 0000644 00000001655 15012240342 0007353 0 ustar 00 <?php use Illuminate\Support\Facades\Route; use Modules\ClubPoint\app\Http\Controllers\Admin\ClubPointController as AdminClubPointController; use Modules\ClubPoint\app\Http\Controllers\ClubPointController; Route::group(['as' => 'admin.', 'prefix' => 'admin', 'middleware' => ['auth:admin', 'translation']], function () { Route::get('clubpoint-setting', [AdminClubPointController::class, 'index'])->name('clubpoint-setting'); Route::put('update-clubpoint-setting', [AdminClubPointController::class, 'update'])->name('update-clubpoint-setting'); Route::get('clubpoint-history', [AdminClubPointController::class, 'history'])->name('clubpoint-history'); }); Route::group(['middleware' => ['auth:web']], function () { Route::get('clubpoints', [ClubPointController::class, 'index'])->name('clubpoints'); Route::get('clubpoint-convert/{id}', [ClubPointController::class, 'clubpoint_convert'])->name('clubpoint-convert'); }); routes/api.php 0000644 00000000215 15012240342 0007336 0 ustar 00 <?php use Illuminate\Support\Facades\Route; Route::middleware(['auth:sanctum'])->prefix('v1')->name('api.')->group(function () { }); composer.json 0000644 00000001311 15012240342 0007253 0 ustar 00 { "name": "nwidart/clubpoint", "description": "", "authors": [ { "name": "Nicolas Widart", "email": "n.widart@gmail.com" } ], "extra": { "laravel": { "providers": [], "aliases": { } } }, "autoload": { "psr-4": { "Modules\\ClubPoint\\": "", "Modules\\ClubPoint\\App\\": "app/", "Modules\\ClubPoint\\Database\\Factories\\": "database/factories/", "Modules\\ClubPoint\\Database\\Seeders\\": "database/seeders/" } }, "autoload-dev": { "psr-4": { "Modules\\ClubPoint\\Tests\\": "tests/" } } } config/config.php 0000644 00000000056 15012240342 0007761 0 ustar 00 <?php return [ 'name' => 'ClubPoint', ]; config/.gitkeep 0000644 00000000000 15012240342 0007421 0 ustar 00 package.json 0000644 00000000410 15012240342 0007016 0 ustar 00 { "private": true, "type": "module", "scripts": { "dev": "vite", "build": "vite build" }, "devDependencies": { "axios": "^1.1.2", "laravel-vite-plugin": "^0.7.5", "sass": "^1.69.5", "postcss": "^8.3.7", "vite": "^4.0.0" } } app/Http/Controllers/.gitkeep 0000644 00000000000 15012240342 0012161 0 ustar 00 app/Http/Controllers/Admin/ClubPointController.php 0000644 00000002507 15012240342 0016252 0 ustar 00 <?php namespace Modules\ClubPoint\app\Http\Controllers\Admin; use Illuminate\Http\Request; use App\Http\Controllers\Controller; use Illuminate\Support\Facades\Cache; use Modules\GlobalSetting\app\Models\Setting; use Modules\ClubPoint\app\Models\ClubPointHistory; class ClubPointController extends Controller { public function index() { return view('clubpoint::admin.setting'); } public function update(Request $request) { $rules = [ 'club_point_rate' => 'required|numeric', ]; $customMessages = [ 'club_point_rate.required' => __('Club point is required'), 'club_point_rate.numeric' => __('Club point should be numeric'), ]; Setting::where('key', 'club_point_rate')->update(['value' => $request->club_point_rate]); Setting::where('key', 'club_point_status')->update(['value' => $request->club_point_status]); Cache::forget('setting'); $notification = __('Updated Successfully'); $notification = ['messege' => $notification, 'alert-type' => 'success']; return redirect()->back()->with($notification); } public function history() { $histories = ClubPointHistory::with('order')->latest()->get(); return view('clubpoint::admin.index', ['histories' => $histories]); } } app/Http/Controllers/ClubPointController.php 0000644 00000003455 15012240342 0015225 0 ustar 00 <?php namespace Modules\ClubPoint\app\Http\Controllers; use App\Http\Controllers\Controller; use Illuminate\Support\Facades\Auth; use Modules\ClubPoint\app\Models\ClubPointHistory; use Modules\GlobalSetting\app\Models\Setting; use Modules\Wallet\app\Models\WalletHistory; class ClubPointController extends Controller { public function index() { $user = Auth::guard('web')->user(); $histories = ClubPointHistory::with('order')->where('user_id', $user->id)->latest()->get(); $wallet_balance = WalletHistory::where('user_id', $user->id)->sum('amount'); return view('clubpoint::index', ['histories' => $histories, 'wallet_balance' => $wallet_balance]); } public function clubpoint_convert($id) { $user = Auth::guard('web')->user(); $club_point_rate = Setting::where('key', 'club_point_rate')->first(); $history = ClubPointHistory::findOrFail($id); $convert_amount = (int) ($history->club_point / $club_point_rate->value); $json_module_data = file_get_contents(base_path('modules_statuses.json')); $module_status = json_decode($json_module_data); if ($module_status->ClubPoint) { $new_wallet = new WalletHistory(); $new_wallet->user_id = $user->id; $new_wallet->amount = $convert_amount; $new_wallet->transaction_id = 'club_point_to_wallet'; $new_wallet->payment_gateway = 'Club Point'; $new_wallet->payment_status = 'success'; $new_wallet->save(); $wallet_balance = $user->wallet_balance; $wallet_balance += $convert_amount; $user->wallet_balance = $wallet_balance; $user->save(); } $history->status = 'success'; $history->save(); return back(); } } app/Http/Requests/.gitkeep 0000644 00000000000 15012240342 0011466 0 ustar 00 app/Http/Middleware/.gitkeep 0000644 00000000000 15012240342 0011730 0 ustar 00 app/Models/.gitkeep 0000644 00000000000 15012240342 0010157 0 ustar 00 app/Models/ClubPointHistory.php 0000644 00000001473 15012240342 0012537 0 ustar 00 <?php namespace Modules\ClubPoint\app\Models; use App\Models\User; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use Modules\ClubPoint\Database\factories\ClubPointHistoryFactory; use Modules\Order\app\Models\Order; class ClubPointHistory extends Model { use HasFactory; /** * The attributes that are mass assignable. */ protected $fillable = []; protected static function newFactory(): ClubPointHistoryFactory { //return ClubPointHistoryFactory::new(); } public function user() { return $this->belongsTo(User::class)->select('id', 'name', 'email', 'image'); } public function order() { return $this->belongsTo(Order::class)->select('id', 'order_id', 'order_status', 'payment_status'); } } app/Models/error_log 0000644 00000000512 15012240342 0010453 0 ustar 00 [12-May-2025 05:57:04 UTC] PHP Fatal error: Uncaught Error: Class "Illuminate\Database\Eloquent\Model" not found in /home/lekhnath/silverray.com.au/Modules/ClubPoint/app/Models/ClubPointHistory.php:11 Stack trace: #0 {main} thrown in /home/lekhnath/silverray.com.au/Modules/ClubPoint/app/Models/ClubPointHistory.php on line 11 app/Providers/RouteServiceProvider.php 0000644 00000002673 15012240342 0014145 0 ustar 00 <?php namespace Modules\ClubPoint\app\Providers; use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider; use Illuminate\Support\Facades\Route; class RouteServiceProvider extends ServiceProvider { /** * The module namespace to assume when generating URLs to actions. */ protected string $moduleNamespace = 'Modules\ClubPoint\app\Http\Controllers'; /** * Called before routes are registered. * * Register any model bindings or pattern based filters. */ public function boot(): void { parent::boot(); } /** * Define the routes for the application. */ public function map(): void { $this->mapApiRoutes(); $this->mapWebRoutes(); } /** * Define the "web" routes for the application. * * These routes all receive session state, CSRF protection, etc. */ protected function mapWebRoutes(): void { Route::middleware('web') ->namespace($this->moduleNamespace) ->group(module_path('ClubPoint', '/routes/web.php')); } /** * Define the "api" routes for the application. * * These routes are typically stateless. */ protected function mapApiRoutes(): void { Route::prefix('api') ->middleware('api') ->namespace($this->moduleNamespace) ->group(module_path('ClubPoint', '/routes/api.php')); } } app/Providers/.gitkeep 0000644 00000000000 15012240342 0010711 0 ustar 00 app/Providers/ClubPointServiceProvider.php 0000644 00000006452 15012240342 0014745 0 ustar 00 <?php namespace Modules\ClubPoint\app\Providers; use Illuminate\Support\Facades\Blade; use Illuminate\Support\ServiceProvider; class ClubPointServiceProvider extends ServiceProvider { protected string $moduleName = 'ClubPoint'; protected string $moduleNameLower = 'clubpoint'; /** * Boot the application events. */ public function boot(): void { $this->registerCommands(); $this->registerCommandSchedules(); $this->registerTranslations(); $this->registerConfig(); $this->registerViews(); $this->loadMigrationsFrom(module_path($this->moduleName, 'database/migrations')); } /** * Register the service provider. */ public function register(): void { $this->app->register(RouteServiceProvider::class); } /** * Register commands in the format of Command::class */ protected function registerCommands(): void { // $this->commands([]); } /** * Register command Schedules. */ protected function registerCommandSchedules(): void { // $this->app->booted(function () { // $schedule = $this->app->make(Schedule::class); // $schedule->command('inspire')->hourly(); // }); } /** * Register translations. */ public function registerTranslations(): void { $langPath = resource_path('lang/modules/'.$this->moduleNameLower); if (is_dir($langPath)) { $this->loadTranslationsFrom($langPath, $this->moduleNameLower); $this->loadJsonTranslationsFrom($langPath); } else { $this->loadTranslationsFrom(module_path($this->moduleName, 'lang'), $this->moduleNameLower); $this->loadJsonTranslationsFrom(module_path($this->moduleName, 'lang')); } } /** * Register config. */ protected function registerConfig(): void { $this->publishes([module_path($this->moduleName, 'config/config.php') => config_path($this->moduleNameLower.'.php')], 'config'); $this->mergeConfigFrom(module_path($this->moduleName, 'config/config.php'), $this->moduleNameLower); } /** * Register views. */ public function registerViews(): void { $viewPath = resource_path('views/modules/'.$this->moduleNameLower); $sourcePath = module_path($this->moduleName, 'resources/views'); $this->publishes([$sourcePath => $viewPath], ['views', $this->moduleNameLower.'-module-views']); $this->loadViewsFrom(array_merge($this->getPublishableViewPaths(), [$sourcePath]), $this->moduleNameLower); $componentNamespace = str_replace('/', '\\', config('modules.namespace').'\\'.$this->moduleName.'\\'.config('modules.paths.generator.component-class.path')); Blade::componentNamespace($componentNamespace, $this->moduleNameLower); } /** * Get the services provided by the provider. */ public function provides(): array { return []; } private function getPublishableViewPaths(): array { $paths = []; foreach (config('view.paths') as $path) { if (is_dir($path.'/modules/'.$this->moduleNameLower)) { $paths[] = $path.'/modules/'.$this->moduleNameLower; } } return $paths; } } app/Providers/error_log 0000644 00000001316 15012240342 0011210 0 ustar 00 [12-May-2025 05:57:54 UTC] PHP Fatal error: Uncaught Error: Class "Illuminate\Support\ServiceProvider" not found in /home/lekhnath/silverray.com.au/Modules/ClubPoint/app/Providers/ClubPointServiceProvider.php:8 Stack trace: #0 {main} thrown in /home/lekhnath/silverray.com.au/Modules/ClubPoint/app/Providers/ClubPointServiceProvider.php on line 8 [13-May-2025 02:44:35 UTC] PHP Fatal error: Uncaught Error: Class "Illuminate\Foundation\Support\Providers\RouteServiceProvider" not found in /home/lekhnath/silverray.com.au/Modules/ClubPoint/app/Providers/RouteServiceProvider.php:8 Stack trace: #0 {main} thrown in /home/lekhnath/silverray.com.au/Modules/ClubPoint/app/Providers/RouteServiceProvider.php on line 8 database/factories/.gitkeep 0000644 00000000000 15012240342 0011677 0 ustar 00 database/migrations/.gitkeep 0000644 00000000000 15012240342 0012074 0 ustar 00 database/migrations/error_log 0000644 00000000646 15012240342 0012400 0 ustar 00 [08-May-2025 06:31:00 UTC] PHP Fatal error: Uncaught Error: Class "Illuminate\Database\Migrations\Migration" not found in /home/lekhnath/silverray.com.au/Modules/ClubPoint/database/migrations/2023_12_04_032407_create_club_point_histories_table.php:7 Stack trace: #0 {main} thrown in /home/lekhnath/silverray.com.au/Modules/ClubPoint/database/migrations/2023_12_04_032407_create_club_point_histories_table.php on line 7 database/migrations/2023_12_04_032407_create_club_point_histories_table.php 0000644 00000001343 15012240342 0022202 0 ustar 00 <?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('club_point_histories', function (Blueprint $table) { $table->id(); $table->integer('user_id'); $table->integer('order_id'); $table->integer('club_point'); $table->string('status')->default('pending'); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('club_point_histories'); } }; database/seeders/.gitkeep 0000644 00000000000 15012240342 0011352 0 ustar 00 database/seeders/ClubPointDatabaseSeeder.php 0000644 00000000377 15012240342 0015127 0 ustar 00 <?php namespace Modules\ClubPoint\database\seeders; use Illuminate\Database\Seeder; class ClubPointDatabaseSeeder extends Seeder { /** * Run the database seeds. */ public function run(): void { // $this->call([]); } } database/seeders/error_log 0000644 00000000532 15012240342 0011650 0 ustar 00 [11-May-2025 07:57:15 UTC] PHP Fatal error: Uncaught Error: Class "Illuminate\Database\Seeder" not found in /home/lekhnath/silverray.com.au/Modules/ClubPoint/database/seeders/ClubPointDatabaseSeeder.php:7 Stack trace: #0 {main} thrown in /home/lekhnath/silverray.com.au/Modules/ClubPoint/database/seeders/ClubPointDatabaseSeeder.php on line 7 resources/assets/.gitkeep 0000644 00000000000 15012240342 0011470 0 ustar 00 resources/assets/js/app.js 0000644 00000000000 15012240342 0011571 0 ustar 00 resources/assets/sass/app.scss 0000644 00000000000 15012240342 0012465 0 ustar 00 resources/views/admin/sidebar.blade.php 0000644 00000001323 15012240342 0014163 0 ustar 00 <li class="nav-item dropdown {{ isRoute('admin.clubpoint-setting') || isRoute('admin.clubpoint-history') ? 'active' : '' }}"> <a href="#" class="nav-link has-dropdown" data-toggle="dropdown"><i class="fas fa-gem"></i> <span>{{ __('Club Point') }} </span> </a> <ul class="dropdown-menu"> <li class="{{ isRoute('admin.clubpoint-setting') ? 'active' : '' }}"><a class="nav-link" href="{{ route('admin.clubpoint-setting') }}">{{ __('Configuration') }}</a></li> <li class="{{ isRoute('admin.clubpoint-history') ? 'active' : '' }}"><a class="nav-link" href="{{ route('admin.clubpoint-history') }}">{{ __('Clubpoint History') }}</a></li> </ul> </li> resources/views/admin/setting.blade.php 0000644 00000005340 15012240342 0014232 0 ustar 00 @extends('admin.master_layout') @section('title') <title>{{ __('Club Point Configuration') }}</title> @endsection @section('admin-content') <div class="main-content"> <section class="section"> <x-admin.breadcrumb title="{{ __('Club Point Configuration') }}" :list="[ __('Dashboard') => route('admin.dashboard'), __('Club Point Configuration') => '#', ]" /> <div class="section-body"> <div class="row"> <div class="col-12"> <div class="card"> <div class="card-header d-flex justify-content-between"> <x-admin.form-title :text="__('Club Point Configuration')" /> <div> <x-admin.back-button :href="route('admin.clubpoint-history')" /> </div> </div> <div class="card-body"> <form action="{{ route('admin.update-clubpoint-setting') }}" method="POST"> @csrf @method('PUT') <div class="row"> <div class="col-md-12"> <div class="form-group"> <x-admin.form-input type="number" id="club_point_rate" name="club_point_rate" label="{{ __('1 USD = Clubpoint ?') }}" placeholder="{{ __('Enter Clubpoint Rate') }}" value="{{ $setting->club_point_rate }}" /> </div> </div> <div class="col-md-12"> <div class="form-group"> <x-admin.form-switch name="club_point_status" label="{{ __('Status') }}" active_value="active" inactive_value="inactive" :checked="$setting->club_point_status == 'active'" /> </div> </div> </div> <x-admin.update-button :text="__('Update')" /> </form> </div> </div> </div> </div> </div> </section> </div> @endsection resources/views/admin/index.blade.php 0000644 00000006177 15012240342 0013675 0 ustar 00 @extends('admin.master_layout') @section('title') <title>{{ __('Club Point History') }}</title> @endsection @section('admin-content') <div class="main-content"> <section class="section"> <x-admin.breadcrumb title="{{ __('Club Point History') }}" :list="[ __('Dashboard') => route('admin.dashboard'), __('Club Point History') => '#', ]" /> <div class="section-body"> <div class="row"> <div class="col-12 col-md-12 col-lg-12"> <div class="card"> <div class="card-body"> <div class="table-responsive"> <table class="table table-striped"> <thead> <th>{{ __('SN') }}</th> <th>{{ __('User') }}</th> <th>{{ __('Order Id') }}</th> <th>{{ __('Club Point') }}</th> <th>{{ __('Earned At') }}</th> <th>{{ __('Status') }}</th> </thead> @forelse ($histories as $index => $history) <tr> <td>{{ ++$index }}</td> <td><a href="{{ route('admin.customer-show', $history->user_id) }}">{{ $history?->user?->name }}</a> </td> <td>#{{ $history?->order?->order_id }}</td> <td>{{ $history->club_point }}</td> <td>{{ formattedDateTime( $history->created_at) }}</td> <td> @if ($history->status == 'pending') <span class="badge bg-danger">{{ __('Pending') }}</span> @else <span class="badge bg-success">{{ __('Converted') }}</span> @endif </td> </tr> @empty <x-empty-table :name="__('')" route="" create="no" :message="__('No data found!')" colspan="6" /> @endforelse </table> </div> </div> </div> </div> </div> </div> </section> </div> @endsection resources/views/.gitkeep 0000644 00000000000 15012240342 0011323 0 ustar 00 resources/views/index.blade.php 0000644 00000004776 15012240342 0012610 0 ustar 00 <!doctype html> <html lang="en"> <head> <!-- Required meta tags --> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- Bootstrap CSS --> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous"> <title>Club Point Module</title> </head> <body> <div class="container"> <h1 class="text-center">Club Point Module</h1> <h1>Total Club Point : {{ $histories->where('status', 'pending')->sum('club_point') }}</h1> <h1>Wallet Balance : {{ currency($wallet_balance) }}</h1> <h3>Club Point To Wallet conversion Rate : 1 USD = {{ $setting->club_point_rate }}</h3> <table class="table table-striped"> <thead> <th>{{ __('SN') }}</th> <th>{{ __('Order Id') }}</th> <th>{{ __('Club Point') }}</th> <th>{{ __('Earned At') }}</th> <th>{{ __('Status') }}</th> </thead> @forelse ($histories as $index => $history) <tr> <td>{{ ++$index }}</td> <td>#{{ $history?->order?->order_id }}</td> <td>{{ $history->club_point }}</td> <td>{{ formattedDateTime( $history->created_at) }}</td> <td> @if ($history->status == 'pending') @if ($history?->order?->order_status == 'success') <a href="{{ route('clubpoint-convert', $history->id) }}">Convert Now</a> @else Refund @endif @else Done @endif </td> </tr> @empty <x-empty-table :name="__('')" route="" create="no" :message="__('No data found!')" colspan="5"></x-empty-table> @endforelse </table> </div> <!-- Optional JavaScript; choose one of the two! --> <!-- Option 1: Bootstrap Bundle with Popper --> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"> </script> </body> </html>
| ver. 1.4 |
Github
|
.
| PHP 8.3.20 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка