From 7ed35989a02bb5ffb4a25e172ef9d94cfe3bb665 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Thu, 11 Sep 2025 16:54:45 +0200 Subject: [PATCH] wip #7605 @5 --- .docker/images/php-fpm/Dockerfile | 2 + .docker/production/docker-compose.yml | 2 +- .../Commands/ConvertArchivesToFluidbook.php | 8 +- app/Console/Commands/Migration.php | 4 +- app/Console/Kernel.php | 6 +- app/Flowpaper/Pdf2Json.php | 40 ------ ...Controller.php => FluidbookController.php} | 36 ++--- app/Http/Controllers/XSendFileController.php | 46 ++++++ app/PdfFile.php | 21 ++- composer.json | 10 +- composer.lock | 135 +++++++++--------- resources/views/flowpaper/view.blade.php | 111 -------------- routes/web.php | 50 +++---- 13 files changed, 179 insertions(+), 292 deletions(-) delete mode 100644 app/Flowpaper/Pdf2Json.php rename app/Http/Controllers/{FlowpaperController.php => FluidbookController.php} (59%) create mode 100644 app/Http/Controllers/XSendFileController.php delete mode 100644 resources/views/flowpaper/view.blade.php diff --git a/.docker/images/php-fpm/Dockerfile b/.docker/images/php-fpm/Dockerfile index a525f99..a835b2e 100644 --- a/.docker/images/php-fpm/Dockerfile +++ b/.docker/images/php-fpm/Dockerfile @@ -13,6 +13,7 @@ ENV TERM=linux ENV DEBIAN_FRONTEND=noninteractive # Add Ondrej PHP repository +RUN apt clean RUN apt update \ && apt install -y --no-install-recommends ca-certificates gnupg bash curl \ && echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu focal main" > /etc/apt/sources.list.d/ondrej-php.list \ @@ -49,6 +50,7 @@ RUN apt -y --no-install-recommends install \ php8.3-curl \ php8.3-bcmath \ php8.3-fpm \ + php8.3-sodium \ less nano wget nodejs RUN apt -y --no-install-recommends install nodejs sudo openssh-server rsyslog cron postfix mariadb-client zip unzip imagemagick diff --git a/.docker/production/docker-compose.yml b/.docker/production/docker-compose.yml index 2c2b901..cfd66f1 100644 --- a/.docker/production/docker-compose.yml +++ b/.docker/production/docker-compose.yml @@ -90,7 +90,7 @@ services: depends_on: - mariadb volumes: - - "./www/.docker/config/adminer/php.ini:/etc/php/conf.d/99-adminer.ini" + - "./www/.docker/config/adminer/php.ini:/usr/local/etc/php/conf.d/99-adminer.ini" environment: ADMINER_DEFAULT_SERVER: presquot-mariadb VIRTUAL_HOST: adminer.dev.prescription-quotidien.com diff --git a/app/Console/Commands/ConvertArchivesToFluidbook.php b/app/Console/Commands/ConvertArchivesToFluidbook.php index a5079fd..c6fc491 100644 --- a/app/Console/Commands/ConvertArchivesToFluidbook.php +++ b/app/Console/Commands/ConvertArchivesToFluidbook.php @@ -31,7 +31,8 @@ class ConvertArchivesToFluidbook extends Command copy($filebin, $path); } if (!file_exists($path)) { - Cache::forever($cacheKey, false); + dd($path); + //Cache::forever($cacheKey, false); continue; } $res = $client->createFluidbook( @@ -47,11 +48,12 @@ class ConvertArchivesToFluidbook extends Command Cache::forever($cacheKey, $res); Artisan::call('psq:fluidbook:updateindex'); } - return; + sleep(30); } } - public static function getCacheKey($reference){ + public static function getCacheKey($reference) + { return "fluidbook_byref_$reference"; } diff --git a/app/Console/Commands/Migration.php b/app/Console/Commands/Migration.php index 8f23157..60900b6 100644 --- a/app/Console/Commands/Migration.php +++ b/app/Console/Commands/Migration.php @@ -35,7 +35,7 @@ class Migration extends Command public function handle() { - $ignore = []; + $ignore = ['settings', 'setting_translations']; $tmp = '/tmp/dump' . rand(100000, 999999) . '.sql'; @@ -44,7 +44,7 @@ class Migration extends Command $mysqldump->setArg('h', env('OLD_DB_HOST')); $mysqldump->setManualArg('-u' . env('OLD_DB_USERNAME') . ' -p' . env('OLD_DB_PASSWORD')); foreach ($ignore as $i) { - $mysqldump->setArg('ignore-table', $i); + $mysqldump->setArg('ignore-table', env('OLD_DB_DATABASE') . '.' . $i); } $mysqldump->setArg(null, env('OLD_DB_DATABASE')); $mysqldump->execute(); diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 799f420..f8bfcab 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -26,11 +26,7 @@ class Kernel extends ConsoleKernel protected function schedule(Schedule $schedule) { $schedule->job(new CheckForTrialExpirationDates)->dailyAt('13:00'); - $schedule->command('psq:fluidbook:archives')->everyThirtyMinutes(); - $schedule->call(function(){ - echo 'test ping !'; - return 'test ping !'; - })->everyMinute(); + $schedule->command('psq:fluidbook:archives')->dailyAt('04:00'); } /** diff --git a/app/Flowpaper/Pdf2Json.php b/app/Flowpaper/Pdf2Json.php deleted file mode 100644 index 9f597a6..0000000 --- a/app/Flowpaper/Pdf2Json.php +++ /dev/null @@ -1,40 +0,0 @@ -redirectToFile) { - return redirect()->action('FlowpaperController@view', ['file' => $newFile->slug]); - } - - if(! \Auth::check()) { - return redirect()->route('login', ['redirect_to' => $request->getUri()]); - } - - if(! \Auth::user()->reg_complete) { - return redirect()->route('account.complete-reg'); - } - - $this->authorize('view', $file); - - - AccessLog::log($request, $file); - return $file->view(); +$file->getFluidbookPath(); } @@ -52,11 +34,11 @@ class FlowpaperController extends Controller */ public function discover(PdfFile $file, Request $request) { - if($newFile = $file->redirectToFile) { - return redirect()->action('FlowpaperController@discover', ['file' => $newFile->slug]); + if ($newFile = $file->redirectToFile) { + return redirect()->action('FluidbookController@discover', ['file' => $newFile->slug]); } - if (! $request->hasValidSignature()) { + if (!$request->hasValidSignature()) { abort(401); } AccessLog::log($request, $file); @@ -73,7 +55,7 @@ class FlowpaperController extends Controller */ public function preview(PdfFile $file, Request $request) { - if (! $request->hasValidSignature()) { + if (!$request->hasValidSignature()) { abort(401); } return $file->view(); @@ -86,7 +68,7 @@ class FlowpaperController extends Controller */ public function download(PdfFile $file, Request $request) { - if (! $request->hasValidSignature()) { + if (!$request->hasValidSignature()) { abort(401); } return $file->getFinalVersion()->downloadFile(); diff --git a/app/Http/Controllers/XSendFileController.php b/app/Http/Controllers/XSendFileController.php new file mode 100644 index 0000000..2cdc707 --- /dev/null +++ b/app/Http/Controllers/XSendFileController.php @@ -0,0 +1,46 @@ +header('Content-Type', Files::_getMimeType($path))->header('Content-Length', $fsize)->header('Last-Modified', gmdate('D, d M Y H:i:s T', $mtime)); + if ($maxage > 0) { + $etag = $mtime . '.' . $fsize; + $response->header('ETag', '"' . $etag . '"')->header('Cache-Control', 'max-age=' . $maxage); + $httpisnotmatch = $request->server('HTTP_IF_NONE_MATCH'); + if (null !== $httpisnotmatch && $etag === $httpisnotmatch) { + return $response->setStatusCode(304); + } + } else { + $response->header('Cache-Control', 'no-store'); + } + foreach ($headers as $key => $value) { + $response->header($key, $value); + } + $response->setContent(':/'); + return $response->header('X-Sendfile', $path); + } + + public static function sendfileNoCache($path) + { + return self::sendfile($path, 0); + } +} diff --git a/app/PdfFile.php b/app/PdfFile.php index d865db0..3e93fd9 100644 --- a/app/PdfFile.php +++ b/app/PdfFile.php @@ -7,9 +7,11 @@ use A17\Twill\Models\Behaviors\HasSlug; use A17\Twill\Models\Behaviors\Sortable; use A17\Twill\Models\Model as TwillModel; use App\Flowpaper\Pdf2Json; +use App\Http\Controllers\XSendFileController; use Aws\S3\S3Client; use Carbon\Carbon; use Fluidbook\ToolboxApiClient\Client; +use Google\Service\Drive\Resource\Files; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Collection; use Illuminate\Database\Eloquent\Model; @@ -131,6 +133,17 @@ class PdfFile extends TwillModel implements Sortable } + public function getFluidbookPath($path = '') + { + $base = \Cubist\Util\Files\Files::mkdir(storage_path('fluidbook/' . $this->slug . '/')); + if (!$path) { + $path = 'index.html'; + } + $pathname = $base . $path; + $res = XSendFileController::sendfile($pathname); + return $res; + } + /** * @throws PdfToImage\Exceptions\PdfDoesNotExist * @throws \Exception @@ -382,7 +395,7 @@ class PdfFile extends TwillModel implements Sortable */ public function getUrl(): string { - return route('flowpaper.view', ['file' => $this->slug]); + return route('fluidbook.view', ['file' => $this->slug]); } /** @@ -392,7 +405,7 @@ class PdfFile extends TwillModel implements Sortable */ public function getUrlWithToken(User $user): string { - return $user->routeWithToken('flowpaper.view', ['file' => $this->slug]); + return $user->routeWithToken('fluidbook.view', ['file' => $this->slug]); } /** @@ -403,7 +416,7 @@ class PdfFile extends TwillModel implements Sortable public function getSignedUrl(User $user): string { return \URL::temporarySignedRoute( - 'flowpaper.discover', + 'fluidbook.discover', now()->addDays(2), ['file' => $this->slug] ); @@ -591,7 +604,7 @@ class PdfFile extends TwillModel implements Sortable */ public function view() { - return view('flowpaper.view', [ + return view('fluidbook.view', [ 'pdfPath' => $this->binUrl, 'jsonPath' => $this->jsonUrl, 'title' => (string)$this, diff --git a/composer.json b/composer.json index 91b78ac..e5eb494 100644 --- a/composer.json +++ b/composer.json @@ -20,10 +20,10 @@ "fluidbook/toolboxapiclient": "*", "fruitcake/laravel-cors": "^1.0", "gabrieliuga/laravel-nova-field-iframe": "^1.0", - "guzzlehttp/guzzle": "^7.9", + "guzzlehttp/guzzle": "^7.10", "html2text/html2text": "^4.3", "idf/nova-unlayer-field": "^0.2.1", - "itsgoingd/clockwork": "^5.2", + "itsgoingd/clockwork": "^5.3", "judev/php-htmltruncator": "^1.2", "kriswallsmith/buzz": "^1.2", "kub-at/php-simple-html-dom-parser": "^1.9", @@ -31,15 +31,15 @@ "laravel/cashier": "^12.17", "laravel/framework": "^8.83", "laravel/horizon": "^5.22", - "laravel/nova": "~3.0", + "laravel/nova": "~3.32", "laravel/scout": "^8.6", - "laravel/tinker": "^2.9", + "laravel/tinker": "^2.10", "league/glide": "^1.7", "league/glide-laravel": "^1.0", "league/html-to-markdown": "^4.10", "maatwebsite/laravel-nova-excel": "^1.2", "mailgun/mailgun-php": "^3.6", - "masterminds/html5": "^2.9", + "masterminds/html5": "^2.10", "numaxlab/nova-ckeditor5-classic": "^1.1", "nyholm/psr7": "^1.8", "php-http/guzzle7-adapter": "^1.1", diff --git a/composer.lock b/composer.lock index d4d21b2..afa77bc 100644 --- a/composer.lock +++ b/composer.lock @@ -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": "d45c969a16e08ea6fc9802e0b87f2e5d", + "content-hash": "2ff911a94282163338e5e60e6895c410", "packages": [ { "name": "anaseqal/nova-import", @@ -344,16 +344,16 @@ }, { "name": "aws/aws-sdk-php", - "version": "3.356.11", + "version": "3.337.3", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "9dcb228185d441cedd4e6fe76905f6a6cdf83a9c" + "reference": "06dfc8f76423b49aaa181debd25bbdc724c346d6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/9dcb228185d441cedd4e6fe76905f6a6cdf83a9c", - "reference": "9dcb228185d441cedd4e6fe76905f6a6cdf83a9c", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/06dfc8f76423b49aaa181debd25bbdc724c346d6", + "reference": "06dfc8f76423b49aaa181debd25bbdc724c346d6", "shasum": "" }, "require": { @@ -361,30 +361,31 @@ "ext-json": "*", "ext-pcre": "*", "ext-simplexml": "*", - "guzzlehttp/guzzle": "^7.4.5", - "guzzlehttp/promises": "^2.0", - "guzzlehttp/psr7": "^2.4.5", - "mtdowling/jmespath.php": "^2.8.0", - "php": ">=8.1", - "psr/http-message": "^2.0" + "guzzlehttp/guzzle": "^6.5.8 || ^7.4.5", + "guzzlehttp/promises": "^1.4.0 || ^2.0", + "guzzlehttp/psr7": "^1.9.1 || ^2.4.5", + "mtdowling/jmespath.php": "^2.6", + "php": ">=7.2.5", + "psr/http-message": "^1.0 || ^2.0" }, "require-dev": { "andrewsville/php-token-reflection": "^1.4", "aws/aws-php-sns-message-validator": "~1.0", "behat/behat": "~3.0", - "composer/composer": "^2.7.8", + "composer/composer": "^1.10.22", "dms/phpunit-arraysubset-asserts": "^0.4.0", "doctrine/cache": "~1.4", "ext-dom": "*", "ext-openssl": "*", "ext-pcntl": "*", "ext-sockets": "*", + "nette/neon": "^2.3", + "paragonie/random_compat": ">= 2", "phpunit/phpunit": "^5.6.3 || ^8.5 || ^9.5", - "psr/cache": "^2.0 || ^3.0", - "psr/simple-cache": "^2.0 || ^3.0", - "sebastian/comparator": "^1.2.3 || ^4.0 || ^5.0", - "symfony/filesystem": "^v6.4.0 || ^v7.1.0", - "yoast/phpunit-polyfills": "^2.0" + "psr/cache": "^1.0 || ^2.0 || ^3.0", + "psr/simple-cache": "^1.0 || ^2.0 || ^3.0", + "sebastian/comparator": "^1.2.3 || ^4.0", + "yoast/phpunit-polyfills": "^1.0" }, "suggest": { "aws/aws-php-sns-message-validator": "To validate incoming SNS notifications", @@ -433,11 +434,11 @@ "sdk" ], "support": { - "forum": "https://github.com/aws/aws-sdk-php/discussions", + "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80", "issues": "https://github.com/aws/aws-sdk-php/issues", - "source": "https://github.com/aws/aws-sdk-php/tree/3.356.11" + "source": "https://github.com/aws/aws-sdk-php/tree/3.337.3" }, - "time": "2025-09-04T18:06:33+00:00" + "time": "2025-01-21T19:10:05+00:00" }, { "name": "biscolab/laravel-recaptcha", @@ -634,20 +635,20 @@ }, { "name": "cakephp/chronos", - "version": "2.5.1", + "version": "2.4.5", "source": { "type": "git", "url": "https://github.com/cakephp/chronos.git", - "reference": "9e7372952e358c9b562460f6a1d08eafe1e1df64" + "reference": "b0321ab7658af9e7abcb3dd876f226e6f3dbb81f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cakephp/chronos/zipball/9e7372952e358c9b562460f6a1d08eafe1e1df64", - "reference": "9e7372952e358c9b562460f6a1d08eafe1e1df64", + "url": "https://api.github.com/repos/cakephp/chronos/zipball/b0321ab7658af9e7abcb3dd876f226e6f3dbb81f", + "reference": "b0321ab7658af9e7abcb3dd876f226e6f3dbb81f", "shasum": "" }, "require": { - "php": ">=8.4" + "php": ">=7.2" }, "require-dev": { "cakephp/cakephp-codesniffer": "^4.5", @@ -688,7 +689,7 @@ "issues": "https://github.com/cakephp/chronos/issues", "source": "https://github.com/cakephp/chronos" }, - "time": "2025-06-18T08:23:08+00:00" + "time": "2024-07-30T22:26:11+00:00" }, { "name": "carbonphp/carbon-doctrine-types", @@ -1200,13 +1201,13 @@ "source": { "type": "git", "url": "git://git.cubedesigners.com/cubist_util.git", - "reference": "5707c953b156499432ada9197f7b4c7c6e6dd9ce" + "reference": "641778c38e73901198cb6684030d0816f93944d9" }, "dist": { "type": "tar", - "url": "https://composer.cubedesigners.com/dist/cubist/util/cubist-util-dev-master-ee0a7c.tar", - "reference": "5707c953b156499432ada9197f7b4c7c6e6dd9ce", - "shasum": "2c903a3859779eb8274250d090526bb5e96854f3" + "url": "https://composer.cubedesigners.com/dist/cubist/util/cubist-util-dev-master-8a5b6e.tar", + "reference": "641778c38e73901198cb6684030d0816f93944d9", + "shasum": "f0c7ef1ba41414170b93e120ebabe053ffaafbdd" }, "require": { "cubist/net": "dev-master", @@ -1218,7 +1219,6 @@ "ext-libxml": "*", "ext-mbstring": "*", "ext-simplexml": "*", - "ext-sodium": "*", "laravel/framework": "~5.8|^6.0|^7.0|^8.0|^9.0|^10.0", "norkunas/youtube-dl-php": "^2.2", "php": ">=7.2" @@ -1240,7 +1240,7 @@ } ], "description": "Utilities class", - "time": "2025-08-28T08:53:02+00:00" + "time": "2025-09-11T14:31:34+00:00" }, { "name": "dflydev/dot-access-data", @@ -2385,16 +2385,16 @@ }, { "name": "google/apiclient-services", - "version": "v0.410.0", + "version": "v0.411.0", "source": { "type": "git", "url": "https://github.com/googleapis/google-api-php-client-services.git", - "reference": "ef335e912305403aef8a6552cc2101c537b9ebdd" + "reference": "3d616fcefdb8e6c598b2d007d4155fe516b91abd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/ef335e912305403aef8a6552cc2101c537b9ebdd", - "reference": "ef335e912305403aef8a6552cc2101c537b9ebdd", + "url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/3d616fcefdb8e6c598b2d007d4155fe516b91abd", + "reference": "3d616fcefdb8e6c598b2d007d4155fe516b91abd", "shasum": "" }, "require": { @@ -2423,9 +2423,9 @@ ], "support": { "issues": "https://github.com/googleapis/google-api-php-client-services/issues", - "source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.410.0" + "source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.411.0" }, - "time": "2025-08-26T16:51:06+00:00" + "time": "2025-09-05T20:24:02+00:00" }, { "name": "google/auth", @@ -5132,23 +5132,23 @@ }, { "name": "league/glide", - "version": "1.x-dev", + "version": "1.7.2", "source": { "type": "git", "url": "https://github.com/thephpleague/glide.git", - "reference": "1f4a11801a10c284953860069ff20415fe2605c7" + "reference": "8dba756ada0b8e525bf6f1f7d1bd83c1e99e124e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/glide/zipball/1f4a11801a10c284953860069ff20415fe2605c7", - "reference": "1f4a11801a10c284953860069ff20415fe2605c7", + "url": "https://api.github.com/repos/thephpleague/glide/zipball/8dba756ada0b8e525bf6f1f7d1bd83c1e99e124e", + "reference": "8dba756ada0b8e525bf6f1f7d1bd83c1e99e124e", "shasum": "" }, "require": { "intervention/image": "^2.4", "league/flysystem": "^1.0", "php": "^7.2|^8.0", - "psr/http-message": "^1.0|^2.0" + "psr/http-message": "^1.0" }, "require-dev": { "mockery/mockery": "^1.3.3", @@ -5196,9 +5196,9 @@ ], "support": { "issues": "https://github.com/thephpleague/glide/issues", - "source": "https://github.com/thephpleague/glide/tree/1.x" + "source": "https://github.com/thephpleague/glide/tree/1.7.2" }, - "time": "2023-08-24T08:37:04+00:00" + "time": "2023-02-14T06:26:04+00:00" }, { "name": "league/glide-laravel", @@ -8211,7 +8211,7 @@ }, { "name": "psq/psq-theme", - "version": "dev-master", + "version": "dev-main", "dist": { "type": "path", "url": "./nova-components/PsqTheme", @@ -8549,16 +8549,16 @@ }, { "name": "psr/http-message", - "version": "2.0", + "version": "1.1", "source": { "type": "git", "url": "https://github.com/php-fig/http-message.git", - "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" + "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", - "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/cb6ce4845ce34a8ad9e68117c10ee90a29919eba", + "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba", "shasum": "" }, "require": { @@ -8567,7 +8567,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "1.1.x-dev" } }, "autoload": { @@ -8582,7 +8582,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "homepage": "http://www.php-fig.org/" } ], "description": "Common interface for HTTP messages", @@ -8596,9 +8596,9 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-message/tree/2.0" + "source": "https://github.com/php-fig/http-message/tree/1.1" }, - "time": "2023-04-04T09:54:51+00:00" + "time": "2023-04-04T09:50:52+00:00" }, { "name": "psr/log", @@ -14018,26 +14018,27 @@ }, { "name": "fzaninotto/faker", - "version": "v1.9.2", + "version": "dev-master", "source": { "type": "git", "url": "https://github.com/fzaninotto/Faker.git", - "reference": "848d8125239d7dbf8ab25cb7f054f1a630e68c2e" + "reference": "5ffe7db6c80f441f150fc88008d64e64af66634b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/848d8125239d7dbf8ab25cb7f054f1a630e68c2e", - "reference": "848d8125239d7dbf8ab25cb7f054f1a630e68c2e", + "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/5ffe7db6c80f441f150fc88008d64e64af66634b", + "reference": "5ffe7db6c80f441f150fc88008d64e64af66634b", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": "^5.3.3 || ^7.0 || ^8.0" }, "require-dev": { "ext-intl": "*", "phpunit/phpunit": "^4.8.35 || ^5.7", "squizlabs/php_codesniffer": "^2.9.2" }, + "default-branch": true, "type": "library", "extra": { "branch-alias": { @@ -14066,10 +14067,10 @@ ], "support": { "issues": "https://github.com/fzaninotto/Faker/issues", - "source": "https://github.com/fzaninotto/Faker/tree/v1.9.2" + "source": "https://github.com/fzaninotto/Faker/tree/master" }, "abandoned": true, - "time": "2020-12-11T09:56:16+00:00" + "time": "2020-12-11T09:59:14+00:00" }, { "name": "hamcrest/hamcrest-php", @@ -15018,16 +15019,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.25", + "version": "9.6.26", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "049c011e01be805202d8eebedef49f769a8ec7b7" + "reference": "a0139ea157533454f611038326f3020b3051f129" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/049c011e01be805202d8eebedef49f769a8ec7b7", - "reference": "049c011e01be805202d8eebedef49f769a8ec7b7", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a0139ea157533454f611038326f3020b3051f129", + "reference": "a0139ea157533454f611038326f3020b3051f129", "shasum": "" }, "require": { @@ -15101,7 +15102,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.25" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.26" }, "funding": [ { @@ -15125,7 +15126,7 @@ "type": "tidelift" } ], - "time": "2025-08-20T14:38:31+00:00" + "time": "2025-09-11T06:17:45+00:00" }, { "name": "sebastian/cli-parser", diff --git a/resources/views/flowpaper/view.blade.php b/resources/views/flowpaper/view.blade.php deleted file mode 100644 index a4e698f..0000000 --- a/resources/views/flowpaper/view.blade.php +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - - - - - {{ $title }} -{{-- --}} - - - - - - - - - - - - - - - - - - - - - - -
- - - - - diff --git a/routes/web.php b/routes/web.php index 02d47db..a1fd4ef 100644 --- a/routes/web.php +++ b/routes/web.php @@ -15,27 +15,25 @@ use Illuminate\Support\Facades\Route; */ - Auth::routes(['verify' => true]); Route::get('/images/{path}', 'ImageController@show')->where('path', '.*'); /** ADMIN ROUTES */ -Route::domain(env('ADMIN_DOMAIN_NAME'))->middleware('auth:twill_users')->group(function() { - +Route::domain(env('ADMIN_DOMAIN_NAME'))->middleware('auth:twill_users')->group(function () { }); /** Client routes */ -Route::domain(env('CLIENT_DOMAIN_NAME'))->group(function() { +Route::domain(env('CLIENT_DOMAIN_NAME'))->group(function () { /** Home */ Route::get('/', 'HomeController@index')->name('home'); /** Account */ - Route::prefix('compte')->middleware(['login.token:false', 'auth'])->group(function() { + Route::prefix('compte')->middleware(['login.token:false', 'auth'])->group(function () { Route::get('valider', 'AccountController@completeRegistration')->name('account.complete-reg'); Route::get('/', 'AccountController@index')->name('account.index'); Route::post('/', 'AccountController@update')->name('account.update'); @@ -57,11 +55,11 @@ Route::domain(env('CLIENT_DOMAIN_NAME'))->group(function() { Route::get('compte/{user}/demander-pdf', 'AccountController@askPdf')->name('account.ask-pdf'); /** Stripe Payment */ - Route::prefix('pay')->group(function() { - Route::post('payment-intents', 'StripeController@paymentIntents')->middleware('auth')->name('payment-intent'); - Route::post('user/{user}/payment-intents', 'StripeController@paymentIntentsSigned')->name('payment-intent.signed'); - Route::get('public-key', 'StripeController@publicKey'); - Route::get('{payment}', 'PaymentController@show')->name('payment.show'); + Route::prefix('pay')->group(function () { + Route::post('payment-intents', 'StripeController@paymentIntents')->middleware('auth')->name('payment-intent'); + Route::post('user/{user}/payment-intents', 'StripeController@paymentIntentsSigned')->name('payment-intent.signed'); + Route::get('public-key', 'StripeController@publicKey'); + Route::get('{payment}', 'PaymentController@show')->name('payment.show'); }); @@ -69,26 +67,25 @@ Route::domain(env('CLIENT_DOMAIN_NAME'))->group(function() { Route::get('unsubscribe/{user}', 'AccountController@unsubscribe')->name('unsubscribe'); - /** Flowpaper viewer */ + /** Fluidbook viewer */ Route::middleware(['login.token', 'authed.verified']) - ->get('/view/{file:slug}', 'FlowpaperController@view') - ->name('flowpaper.view'); + ->get('/view/{file:slug}', 'FluidbookController@view') + ->name('fluidbook.view'); Route::get('edition/{file:slug}', 'FileController@show'); /** For discover users */ - Route::get('discover/{file:slug}', 'FlowpaperController@discover')->name('flowpaper.discover'); + Route::get('discover/{file:slug}', 'FluidbookController@discover')->name('fluidbook.discover'); /** For admin preview */ - Route::get('preview/{file:slug}', 'FlowpaperController@preview')->name('flowpaper.preview'); + Route::get('preview/{file:slug}', 'FluidbookController@preview')->name('fluidbook.preview'); /** Download file */ - Route::get('download/{file:slug}', 'FlowpaperController@download')->name('pdf.download'); - + Route::get('download/{file:slug}', 'FluidbookController@download')->name('pdf.download'); Route::get('archives', 'ArchiveController@index')->name('archives.index'); Route::get('search', 'FileController@search')->name('archives'); - Route::prefix('campagnes-et-communication')->group(function() { + Route::prefix('campagnes-et-communication')->group(function () { Route::get('/', 'AdCampaignController@index')->name('com-campaign.index'); Route::get('archives', 'AdCampaignController@search')->name('com-campaign.search'); Route::get('{slug}', 'AdCampaignController@show')->name('com-campaign.show'); @@ -105,7 +102,7 @@ Route::domain(env('CLIENT_DOMAIN_NAME'))->group(function() { Route::get('demande-d-abonnement', 'ContactController@requestSubscriptionForm')->name('contact.subscribe'); Route::post('demande-d-abonnement', 'ContactController@storeSubscriptionForm')->name('contact.subscribe.store'); - Route::prefix('actus-labos')->group(function() { + Route::prefix('actus-labos')->group(function () { Route::get('', 'ActuLabosController@index')->name('actus-labos.index'); Route::get('{slug}', 'ActuLabosController@show')->name('actus-labos.show'); }); @@ -113,7 +110,7 @@ Route::domain(env('CLIENT_DOMAIN_NAME'))->group(function() { Route::get('article/{slug}', 'SocialArticleController@show')->name('social-article.show'); Route::get('article-psq/{slug}', 'PrintableArticleController@show')->name('printable-article.show'); - Route::prefix('sondages')->group(function() { + Route::prefix('sondages')->group(function () { Route::get('{slug}', 'PollController@show')->name('poll.show'); Route::post('{slug}', 'PollController@submit')->name('poll.submit'); }); @@ -126,7 +123,6 @@ Route::domain(env('CLIENT_DOMAIN_NAME'))->group(function() { }); - Route::get('agenda-et-humeurs', 'EnPlusController@index')->name('humeur-agenda.index'); Route::get('humeurs', 'HumeurController@index')->name('humeur.index'); Route::get('humeurs/{slug}', 'HumeurController@show')->name('humeur.show'); @@ -145,13 +141,13 @@ Route::domain(env('CLIENT_DOMAIN_NAME'))->group(function() { }); /** Public routes + NGROK routes */ -Route::pattern('client_domains', '('.implode('|', [ +Route::pattern('client_domains', '(' . implode('|', [ env('CLIENT_DOMAIN_NAME'), env('NGROK_DOMAIN_NAME'), - ]).')' + ]) . ')' ); -Route::domain('{client_domains}')->group(function() { +Route::domain('{client_domains}')->group(function () { /** Webhooks */ Route::prefix('webhooks')->middleware('json.response')->group(function () { Route::post('mailgun-event', 'WebhookController@mailgunEvent'); @@ -160,10 +156,10 @@ Route::domain('{client_domains}')->group(function() { }); }); -Route::get('mentions-legales', function() { - return view('mentions.index'); +Route::get('mentions-legales', function () { + return view('mentions.index'); })->name("mentions.index"); -if(config('app.env') === 'local') { +if (config('app.env') === 'local') { Route::get('debug', 'DebugController@test'); } -- 2.39.5