多🌹444收拾收拾计算机视觉手机手机手机手机4大尺寸惆怅长岑长 ??????????????????????????С??????????????P??????????????????????????????????????????????????????^?????????? ????j?????????? ? PNG ?%k25u25%fgd5n!? PNG ?%k25u25%fgd5n!? PNG ?%k25u25%fgd5n!? PNG ?%k25u25%fgd5n!extension.json000064400000000207152666204170007463 0ustar00{ "name": "Influencer Avatar", "type": "extension", "version": "1.3.0", "description": "Influencer Avatar extension for magicai" } System/InfluencerAvatarServiceProvider.php000064400000004461152666204170015044 0ustar00 * * @note When you create a new service provider, make sure to add it to the "MarketplaceServiceProvider". Otherwise, your Laravel application won’t recognize this provider, and the related functions won’t work properly. * @note If you want to perform a specific action when an extension is uninstalled, you can use the UninstallExtensionServiceProviderInterface. By implementing this interface, you can define custom operations that will be triggered during the uninstallation of the extension. */ class InfluencerAvatarServiceProvider extends ServiceProvider implements UninstallExtensionServiceProviderInterface { public function boot(Kernel $kernel): void { $this->registerViews() ->registerRoutes(); } public function registerViews(): static { $this->loadViewsFrom([__DIR__ . '/../resources/views'], 'influencer-avatar'); return $this; } private function registerRoutes(): static { Route::group([ 'middleware' => ['web', 'auth'], ], function () { Route::group([ 'prefix' => 'dashboard/user/influencer-avatar', 'as' => 'dashboard.user.influencer-avatar.', ], function () { Route::get('', [InfluencerAvatarController::class, 'index'])->name('index'); Route::post('generate-short-video', [InfluencerAvatarController::class, 'generateShortVideo'])->name('generate-short-video'); Route::get('check-video-status/{request_id}', [InfluencerAvatarController::class, 'checkStatus'])->name('check-video-status'); Route::get('get-final-result/{request_id}', [InfluencerAvatarController::class, 'getFinalVideo'])->name('get-final-result'); }); }); return $this; } public static function uninstall(): void { // TODO: Implement uninstall() method. } } System/Http/Controllers/InfluencerAvatarController.php000064400000007033152666204170017277 0ustar00json([ 'status' => 'error', 'message' => trans('This feature is disabled in demo mode.'), ]); } $validated = $request->validated(); $driver = Entity::driver(EntityEnum::VEED)->inputVideoCount(1)->calculateCredit(); $driver->redirectIfNoCreditBalance(); $driver->decreaseCredit(); try { $service = new FalAIService(ApiHelper::setFalAIKey()); $res = $service->textToVideoModel(EntityEnum::VEED)->submit($validated); $requestId = $res->getData()?->resData?->request_id; if (! empty($requestId)) { ExportedVideo::create([ 'task_id' => $requestId, 'status' => VideoStatusEnum::IN_PROGRESS->value, 'used_ai_tool' => 'fal-ai', ]); } return $res; } catch (Throwable $th) { return $this->exceptionRes($th, 'Error happen while generate short video on ai-influcener'); } } // check status of generating video public function checkStatus(string $requestId): JsonResponse { try { $service = new FalAIService(ApiHelper::setFalAIKey()); return $service->textToVideoModel(EntityEnum::VEED)->checkStatus($requestId); } catch (Throwable $th) { return $this->exceptionRes($th, 'Error happen while checking status of generating video on ai-influcener'); } } // get final video public function getFinalVideo(string $requestId): JsonResponse { try { $service = new FalAIService(ApiHelper::setFalAIKey()); $resData = $service->textToVideoModel(EntityEnum::VEED)->getResult($requestId)->getData(); if ($resData->status === 'success') { $videoResult = $resData->resData->video; $video = ExportedVideo::where('task_id', $requestId)->first(); $video->update([ 'video_url' => $videoResult->url, 'title' => 'Short Video', 'status' => VideoStatusEnum::COMPLETED->value, ]); return response()->json([ 'status' => 'success', 'resData' => $video, ]); } $video = ExportedVideo::where('task_id', $requestId)->update([ 'status' => VideoStatusEnum::FAILED->value, ]); throw new RuntimeException($resData->message ?? 'Unexpected issue happen'); } catch (Throwable $th) { return $this->exceptionRes($th, 'Error happen while get final result on ai-influcener'); } } } resources/views/social-video-window/social-video-window.blade.php000064400000036005152666204170021255 0ustar00{{-- Edit Window --}} {{-- --}} @push('script') @endpush resources/views/index.blade.php000064400000004703152666204170012616 0ustar00@extends('panel.layout.app', [ 'disable_tblr' => true, ]) @section('title', __('AI Influencer Avatar')) @section('titlebar_subtitle', __('Generate captivating influencer video content for Reels, TikTok, and Shorts.')) @section('titlebar_actions', '') @section('content')
@include('influencer-avatar::social-video-window.social-video-window', ['overlay' => false])
@endsection @push('script') @endpush resources/views/home/actions-grid.blade.php000064400000003702152666204170015020 0ustar00
{{-- Add new product ad card --}}
Generate new video

@lang('Generate captivating video content with influencers.')

@lang('Generate New')
@include('influencer-avatar::social-video-window.social-video-window', ['overlay' => true])
@push('script') @endpush __MACOSX/._System000064400000000243152666204170007470 0ustar00Mac OS X  2q£ATTR£˜ ˜ com.apple.provenance¤`˜†TÜç__MACOSX/._resources000064400000000243152666204170010216 0ustar00Mac OS X  2q£ATTR£˜ ˜ com.apple.provenance¤`˜†TÜç__MACOSX/System/._Http000064400000000243152666204170010407 0ustar00Mac OS X  2q£ATTR£˜ ˜ com.apple.provenance¤`˜†TÜç__MACOSX/System/Http/Controllers/._InfluencerAvatarController.php000064400000000243152666204170021000 0ustar00Mac OS X  2q£ATTR£˜ ˜ com.apple.provenance¤`˜†TÜç__MACOSX/System/Http/._Controllers000064400000000243152666204170012715 0ustar00Mac OS X  2q£ATTR£˜ ˜ com.apple.provenance¤`˜†TÜç__MACOSX/System/._InfluencerAvatarServiceProvider.php000064400000000243152666204170016543 0ustar00Mac OS X  2q£ATTR£˜ ˜ com.apple.provenance¤`˜†TÜç__MACOSX/resources/views/social-video-window/._social-video-window.blade.php000064400000000243152666204170022755 0ustar00Mac OS X  2q£ATTR£˜ ˜ com.apple.provenance¤`˜†TÜç__MACOSX/resources/views/._index.blade.php000064400000000243152666204170014316 0ustar00Mac OS X  2q£ATTR£˜ ˜ com.apple.provenance¤`˜†TÜç__MACOSX/resources/views/._social-video-window000064400000000243152666204170015236 0ustar00Mac OS X  2q£ATTR£˜ ˜ com.apple.provenance¤`˜†TÜç__MACOSX/resources/views/home/._actions-grid.blade.php000064400000000243152666204170016522 0ustar00Mac OS X  2q£ATTR£˜ ˜ com.apple.provenance¤`˜†TÜç__MACOSX/resources/views/._home000064400000000243152666204170012303 0ustar00Mac OS X  2q£ATTR£˜ ˜ com.apple.provenance¤`˜†TÜç__MACOSX/resources/._views000064400000000243152666204170011353 0ustar00Mac OS X  2q£ATTR£˜ ˜ com.apple.provenance¤`˜†TÜç__MACOSX/._extension.json000064400000000243152666204170011170 0ustar00Mac OS X  2q£ATTR£˜ ˜ com.apple.provenance¤`˜†TÜç