mirror of https://github.com/kcal-app/kcal.git
Add initial recipe image support
This commit is contained in:
parent
4b31f87f98
commit
5c26498a38
|
|
@ -67,6 +67,10 @@ namespace PHPSTORM_META {
|
|||
'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class,
|
||||
'Psr\Http\Message\ResponseInterface' => \Nyholm\Psr7\Response::class,
|
||||
'Psr\Http\Message\ServerRequestInterface' => \Nyholm\Psr7\ServerRequest::class,
|
||||
'Spatie\MediaLibrary\MediaCollections\Filesystem' => \Spatie\MediaLibrary\MediaCollections\Filesystem::class,
|
||||
'Spatie\MediaLibrary\MediaCollections\MediaRepository' => \Spatie\MediaLibrary\MediaCollections\MediaRepository::class,
|
||||
'Spatie\MediaLibrary\ResponsiveImages\TinyPlaceholderGenerator\TinyPlaceholderGenerator' => \Spatie\MediaLibrary\ResponsiveImages\TinyPlaceholderGenerator\Blurred::class,
|
||||
'Spatie\MediaLibrary\ResponsiveImages\WidthCalculator\WidthCalculator' => \Spatie\MediaLibrary\ResponsiveImages\WidthCalculator\FileSizeOptimizedWidthCalculator::class,
|
||||
'Whoops\Handler\HandlerInterface' => \Facade\Ignition\ErrorPage\IgnitionWhoopsHandler::class,
|
||||
'auth' => \Illuminate\Auth\AuthManager::class,
|
||||
'auth.driver' => \Illuminate\Auth\SessionGuard::class,
|
||||
|
|
@ -107,6 +111,9 @@ namespace PHPSTORM_META {
|
|||
'command.mail.make' => \Illuminate\Foundation\Console\MailMakeCommand::class,
|
||||
'command.make:solution' => \Facade\Ignition\Commands\SolutionMakeCommand::class,
|
||||
'command.make:solution-provider' => \Facade\Ignition\Commands\SolutionProviderMakeCommand::class,
|
||||
'command.media-library:clean' => \Spatie\MediaLibrary\MediaCollections\Commands\CleanCommand::class,
|
||||
'command.media-library:clear' => \Spatie\MediaLibrary\MediaCollections\Commands\ClearCommand::class,
|
||||
'command.media-library:regenerate' => \Spatie\MediaLibrary\Conversions\Commands\RegenerateCommand::class,
|
||||
'command.middleware.make' => \Illuminate\Routing\Console\MiddlewareMakeCommand::class,
|
||||
'command.migrate' => \Illuminate\Database\Console\Migrations\MigrateCommand::class,
|
||||
'command.migrate.fresh' => \Illuminate\Database\Console\Migrations\FreshCommand::class,
|
||||
|
|
@ -172,6 +179,7 @@ namespace PHPSTORM_META {
|
|||
'flare.logger' => \Monolog\Logger::class,
|
||||
'hash' => \Illuminate\Hashing\HashManager::class,
|
||||
'hash.driver' => \Illuminate\Hashing\BcryptHasher::class,
|
||||
'image' => \Intervention\Image\ImageManager::class,
|
||||
'log' => \Illuminate\Log\LogManager::class,
|
||||
'mail.manager' => \Illuminate\Mail\MailManager::class,
|
||||
'mailer' => \Illuminate\Mail\Mailer::class,
|
||||
|
|
@ -255,6 +263,10 @@ namespace PHPSTORM_META {
|
|||
'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class,
|
||||
'Psr\Http\Message\ResponseInterface' => \Nyholm\Psr7\Response::class,
|
||||
'Psr\Http\Message\ServerRequestInterface' => \Nyholm\Psr7\ServerRequest::class,
|
||||
'Spatie\MediaLibrary\MediaCollections\Filesystem' => \Spatie\MediaLibrary\MediaCollections\Filesystem::class,
|
||||
'Spatie\MediaLibrary\MediaCollections\MediaRepository' => \Spatie\MediaLibrary\MediaCollections\MediaRepository::class,
|
||||
'Spatie\MediaLibrary\ResponsiveImages\TinyPlaceholderGenerator\TinyPlaceholderGenerator' => \Spatie\MediaLibrary\ResponsiveImages\TinyPlaceholderGenerator\Blurred::class,
|
||||
'Spatie\MediaLibrary\ResponsiveImages\WidthCalculator\WidthCalculator' => \Spatie\MediaLibrary\ResponsiveImages\WidthCalculator\FileSizeOptimizedWidthCalculator::class,
|
||||
'Whoops\Handler\HandlerInterface' => \Facade\Ignition\ErrorPage\IgnitionWhoopsHandler::class,
|
||||
'auth' => \Illuminate\Auth\AuthManager::class,
|
||||
'auth.driver' => \Illuminate\Auth\SessionGuard::class,
|
||||
|
|
@ -295,6 +307,9 @@ namespace PHPSTORM_META {
|
|||
'command.mail.make' => \Illuminate\Foundation\Console\MailMakeCommand::class,
|
||||
'command.make:solution' => \Facade\Ignition\Commands\SolutionMakeCommand::class,
|
||||
'command.make:solution-provider' => \Facade\Ignition\Commands\SolutionProviderMakeCommand::class,
|
||||
'command.media-library:clean' => \Spatie\MediaLibrary\MediaCollections\Commands\CleanCommand::class,
|
||||
'command.media-library:clear' => \Spatie\MediaLibrary\MediaCollections\Commands\ClearCommand::class,
|
||||
'command.media-library:regenerate' => \Spatie\MediaLibrary\Conversions\Commands\RegenerateCommand::class,
|
||||
'command.middleware.make' => \Illuminate\Routing\Console\MiddlewareMakeCommand::class,
|
||||
'command.migrate' => \Illuminate\Database\Console\Migrations\MigrateCommand::class,
|
||||
'command.migrate.fresh' => \Illuminate\Database\Console\Migrations\FreshCommand::class,
|
||||
|
|
@ -360,6 +375,7 @@ namespace PHPSTORM_META {
|
|||
'flare.logger' => \Monolog\Logger::class,
|
||||
'hash' => \Illuminate\Hashing\HashManager::class,
|
||||
'hash.driver' => \Illuminate\Hashing\BcryptHasher::class,
|
||||
'image' => \Intervention\Image\ImageManager::class,
|
||||
'log' => \Illuminate\Log\LogManager::class,
|
||||
'mail.manager' => \Illuminate\Mail\MailManager::class,
|
||||
'mailer' => \Illuminate\Mail\Mailer::class,
|
||||
|
|
@ -443,6 +459,10 @@ namespace PHPSTORM_META {
|
|||
'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class,
|
||||
'Psr\Http\Message\ResponseInterface' => \Nyholm\Psr7\Response::class,
|
||||
'Psr\Http\Message\ServerRequestInterface' => \Nyholm\Psr7\ServerRequest::class,
|
||||
'Spatie\MediaLibrary\MediaCollections\Filesystem' => \Spatie\MediaLibrary\MediaCollections\Filesystem::class,
|
||||
'Spatie\MediaLibrary\MediaCollections\MediaRepository' => \Spatie\MediaLibrary\MediaCollections\MediaRepository::class,
|
||||
'Spatie\MediaLibrary\ResponsiveImages\TinyPlaceholderGenerator\TinyPlaceholderGenerator' => \Spatie\MediaLibrary\ResponsiveImages\TinyPlaceholderGenerator\Blurred::class,
|
||||
'Spatie\MediaLibrary\ResponsiveImages\WidthCalculator\WidthCalculator' => \Spatie\MediaLibrary\ResponsiveImages\WidthCalculator\FileSizeOptimizedWidthCalculator::class,
|
||||
'Whoops\Handler\HandlerInterface' => \Facade\Ignition\ErrorPage\IgnitionWhoopsHandler::class,
|
||||
'auth' => \Illuminate\Auth\AuthManager::class,
|
||||
'auth.driver' => \Illuminate\Auth\SessionGuard::class,
|
||||
|
|
@ -483,6 +503,9 @@ namespace PHPSTORM_META {
|
|||
'command.mail.make' => \Illuminate\Foundation\Console\MailMakeCommand::class,
|
||||
'command.make:solution' => \Facade\Ignition\Commands\SolutionMakeCommand::class,
|
||||
'command.make:solution-provider' => \Facade\Ignition\Commands\SolutionProviderMakeCommand::class,
|
||||
'command.media-library:clean' => \Spatie\MediaLibrary\MediaCollections\Commands\CleanCommand::class,
|
||||
'command.media-library:clear' => \Spatie\MediaLibrary\MediaCollections\Commands\ClearCommand::class,
|
||||
'command.media-library:regenerate' => \Spatie\MediaLibrary\Conversions\Commands\RegenerateCommand::class,
|
||||
'command.middleware.make' => \Illuminate\Routing\Console\MiddlewareMakeCommand::class,
|
||||
'command.migrate' => \Illuminate\Database\Console\Migrations\MigrateCommand::class,
|
||||
'command.migrate.fresh' => \Illuminate\Database\Console\Migrations\FreshCommand::class,
|
||||
|
|
@ -548,6 +571,7 @@ namespace PHPSTORM_META {
|
|||
'flare.logger' => \Monolog\Logger::class,
|
||||
'hash' => \Illuminate\Hashing\HashManager::class,
|
||||
'hash.driver' => \Illuminate\Hashing\BcryptHasher::class,
|
||||
'image' => \Intervention\Image\ImageManager::class,
|
||||
'log' => \Illuminate\Log\LogManager::class,
|
||||
'mail.manager' => \Illuminate\Mail\MailManager::class,
|
||||
'mailer' => \Illuminate\Mail\Mailer::class,
|
||||
|
|
@ -631,6 +655,10 @@ namespace PHPSTORM_META {
|
|||
'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class,
|
||||
'Psr\Http\Message\ResponseInterface' => \Nyholm\Psr7\Response::class,
|
||||
'Psr\Http\Message\ServerRequestInterface' => \Nyholm\Psr7\ServerRequest::class,
|
||||
'Spatie\MediaLibrary\MediaCollections\Filesystem' => \Spatie\MediaLibrary\MediaCollections\Filesystem::class,
|
||||
'Spatie\MediaLibrary\MediaCollections\MediaRepository' => \Spatie\MediaLibrary\MediaCollections\MediaRepository::class,
|
||||
'Spatie\MediaLibrary\ResponsiveImages\TinyPlaceholderGenerator\TinyPlaceholderGenerator' => \Spatie\MediaLibrary\ResponsiveImages\TinyPlaceholderGenerator\Blurred::class,
|
||||
'Spatie\MediaLibrary\ResponsiveImages\WidthCalculator\WidthCalculator' => \Spatie\MediaLibrary\ResponsiveImages\WidthCalculator\FileSizeOptimizedWidthCalculator::class,
|
||||
'Whoops\Handler\HandlerInterface' => \Facade\Ignition\ErrorPage\IgnitionWhoopsHandler::class,
|
||||
'auth' => \Illuminate\Auth\AuthManager::class,
|
||||
'auth.driver' => \Illuminate\Auth\SessionGuard::class,
|
||||
|
|
@ -671,6 +699,9 @@ namespace PHPSTORM_META {
|
|||
'command.mail.make' => \Illuminate\Foundation\Console\MailMakeCommand::class,
|
||||
'command.make:solution' => \Facade\Ignition\Commands\SolutionMakeCommand::class,
|
||||
'command.make:solution-provider' => \Facade\Ignition\Commands\SolutionProviderMakeCommand::class,
|
||||
'command.media-library:clean' => \Spatie\MediaLibrary\MediaCollections\Commands\CleanCommand::class,
|
||||
'command.media-library:clear' => \Spatie\MediaLibrary\MediaCollections\Commands\ClearCommand::class,
|
||||
'command.media-library:regenerate' => \Spatie\MediaLibrary\Conversions\Commands\RegenerateCommand::class,
|
||||
'command.middleware.make' => \Illuminate\Routing\Console\MiddlewareMakeCommand::class,
|
||||
'command.migrate' => \Illuminate\Database\Console\Migrations\MigrateCommand::class,
|
||||
'command.migrate.fresh' => \Illuminate\Database\Console\Migrations\FreshCommand::class,
|
||||
|
|
@ -736,6 +767,7 @@ namespace PHPSTORM_META {
|
|||
'flare.logger' => \Monolog\Logger::class,
|
||||
'hash' => \Illuminate\Hashing\HashManager::class,
|
||||
'hash.driver' => \Illuminate\Hashing\BcryptHasher::class,
|
||||
'image' => \Intervention\Image\ImageManager::class,
|
||||
'log' => \Illuminate\Log\LogManager::class,
|
||||
'mail.manager' => \Illuminate\Mail\MailManager::class,
|
||||
'mailer' => \Illuminate\Mail\Mailer::class,
|
||||
|
|
@ -819,6 +851,10 @@ namespace PHPSTORM_META {
|
|||
'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class,
|
||||
'Psr\Http\Message\ResponseInterface' => \Nyholm\Psr7\Response::class,
|
||||
'Psr\Http\Message\ServerRequestInterface' => \Nyholm\Psr7\ServerRequest::class,
|
||||
'Spatie\MediaLibrary\MediaCollections\Filesystem' => \Spatie\MediaLibrary\MediaCollections\Filesystem::class,
|
||||
'Spatie\MediaLibrary\MediaCollections\MediaRepository' => \Spatie\MediaLibrary\MediaCollections\MediaRepository::class,
|
||||
'Spatie\MediaLibrary\ResponsiveImages\TinyPlaceholderGenerator\TinyPlaceholderGenerator' => \Spatie\MediaLibrary\ResponsiveImages\TinyPlaceholderGenerator\Blurred::class,
|
||||
'Spatie\MediaLibrary\ResponsiveImages\WidthCalculator\WidthCalculator' => \Spatie\MediaLibrary\ResponsiveImages\WidthCalculator\FileSizeOptimizedWidthCalculator::class,
|
||||
'Whoops\Handler\HandlerInterface' => \Facade\Ignition\ErrorPage\IgnitionWhoopsHandler::class,
|
||||
'auth' => \Illuminate\Auth\AuthManager::class,
|
||||
'auth.driver' => \Illuminate\Auth\SessionGuard::class,
|
||||
|
|
@ -859,6 +895,9 @@ namespace PHPSTORM_META {
|
|||
'command.mail.make' => \Illuminate\Foundation\Console\MailMakeCommand::class,
|
||||
'command.make:solution' => \Facade\Ignition\Commands\SolutionMakeCommand::class,
|
||||
'command.make:solution-provider' => \Facade\Ignition\Commands\SolutionProviderMakeCommand::class,
|
||||
'command.media-library:clean' => \Spatie\MediaLibrary\MediaCollections\Commands\CleanCommand::class,
|
||||
'command.media-library:clear' => \Spatie\MediaLibrary\MediaCollections\Commands\ClearCommand::class,
|
||||
'command.media-library:regenerate' => \Spatie\MediaLibrary\Conversions\Commands\RegenerateCommand::class,
|
||||
'command.middleware.make' => \Illuminate\Routing\Console\MiddlewareMakeCommand::class,
|
||||
'command.migrate' => \Illuminate\Database\Console\Migrations\MigrateCommand::class,
|
||||
'command.migrate.fresh' => \Illuminate\Database\Console\Migrations\FreshCommand::class,
|
||||
|
|
@ -924,6 +963,7 @@ namespace PHPSTORM_META {
|
|||
'flare.logger' => \Monolog\Logger::class,
|
||||
'hash' => \Illuminate\Hashing\HashManager::class,
|
||||
'hash.driver' => \Illuminate\Hashing\BcryptHasher::class,
|
||||
'image' => \Intervention\Image\ImageManager::class,
|
||||
'log' => \Illuminate\Log\LogManager::class,
|
||||
'mail.manager' => \Illuminate\Mail\MailManager::class,
|
||||
'mailer' => \Illuminate\Mail\Mailer::class,
|
||||
|
|
@ -1007,6 +1047,10 @@ namespace PHPSTORM_META {
|
|||
'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class,
|
||||
'Psr\Http\Message\ResponseInterface' => \Nyholm\Psr7\Response::class,
|
||||
'Psr\Http\Message\ServerRequestInterface' => \Nyholm\Psr7\ServerRequest::class,
|
||||
'Spatie\MediaLibrary\MediaCollections\Filesystem' => \Spatie\MediaLibrary\MediaCollections\Filesystem::class,
|
||||
'Spatie\MediaLibrary\MediaCollections\MediaRepository' => \Spatie\MediaLibrary\MediaCollections\MediaRepository::class,
|
||||
'Spatie\MediaLibrary\ResponsiveImages\TinyPlaceholderGenerator\TinyPlaceholderGenerator' => \Spatie\MediaLibrary\ResponsiveImages\TinyPlaceholderGenerator\Blurred::class,
|
||||
'Spatie\MediaLibrary\ResponsiveImages\WidthCalculator\WidthCalculator' => \Spatie\MediaLibrary\ResponsiveImages\WidthCalculator\FileSizeOptimizedWidthCalculator::class,
|
||||
'Whoops\Handler\HandlerInterface' => \Facade\Ignition\ErrorPage\IgnitionWhoopsHandler::class,
|
||||
'auth' => \Illuminate\Auth\AuthManager::class,
|
||||
'auth.driver' => \Illuminate\Auth\SessionGuard::class,
|
||||
|
|
@ -1047,6 +1091,9 @@ namespace PHPSTORM_META {
|
|||
'command.mail.make' => \Illuminate\Foundation\Console\MailMakeCommand::class,
|
||||
'command.make:solution' => \Facade\Ignition\Commands\SolutionMakeCommand::class,
|
||||
'command.make:solution-provider' => \Facade\Ignition\Commands\SolutionProviderMakeCommand::class,
|
||||
'command.media-library:clean' => \Spatie\MediaLibrary\MediaCollections\Commands\CleanCommand::class,
|
||||
'command.media-library:clear' => \Spatie\MediaLibrary\MediaCollections\Commands\ClearCommand::class,
|
||||
'command.media-library:regenerate' => \Spatie\MediaLibrary\Conversions\Commands\RegenerateCommand::class,
|
||||
'command.middleware.make' => \Illuminate\Routing\Console\MiddlewareMakeCommand::class,
|
||||
'command.migrate' => \Illuminate\Database\Console\Migrations\MigrateCommand::class,
|
||||
'command.migrate.fresh' => \Illuminate\Database\Console\Migrations\FreshCommand::class,
|
||||
|
|
@ -1112,6 +1159,7 @@ namespace PHPSTORM_META {
|
|||
'flare.logger' => \Monolog\Logger::class,
|
||||
'hash' => \Illuminate\Hashing\HashManager::class,
|
||||
'hash.driver' => \Illuminate\Hashing\BcryptHasher::class,
|
||||
'image' => \Intervention\Image\ImageManager::class,
|
||||
'log' => \Illuminate\Log\LogManager::class,
|
||||
'mail.manager' => \Illuminate\Mail\MailManager::class,
|
||||
'mailer' => \Illuminate\Mail\Mailer::class,
|
||||
|
|
@ -1195,6 +1243,10 @@ namespace PHPSTORM_META {
|
|||
'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class,
|
||||
'Psr\Http\Message\ResponseInterface' => \Nyholm\Psr7\Response::class,
|
||||
'Psr\Http\Message\ServerRequestInterface' => \Nyholm\Psr7\ServerRequest::class,
|
||||
'Spatie\MediaLibrary\MediaCollections\Filesystem' => \Spatie\MediaLibrary\MediaCollections\Filesystem::class,
|
||||
'Spatie\MediaLibrary\MediaCollections\MediaRepository' => \Spatie\MediaLibrary\MediaCollections\MediaRepository::class,
|
||||
'Spatie\MediaLibrary\ResponsiveImages\TinyPlaceholderGenerator\TinyPlaceholderGenerator' => \Spatie\MediaLibrary\ResponsiveImages\TinyPlaceholderGenerator\Blurred::class,
|
||||
'Spatie\MediaLibrary\ResponsiveImages\WidthCalculator\WidthCalculator' => \Spatie\MediaLibrary\ResponsiveImages\WidthCalculator\FileSizeOptimizedWidthCalculator::class,
|
||||
'Whoops\Handler\HandlerInterface' => \Facade\Ignition\ErrorPage\IgnitionWhoopsHandler::class,
|
||||
'auth' => \Illuminate\Auth\AuthManager::class,
|
||||
'auth.driver' => \Illuminate\Auth\SessionGuard::class,
|
||||
|
|
@ -1235,6 +1287,9 @@ namespace PHPSTORM_META {
|
|||
'command.mail.make' => \Illuminate\Foundation\Console\MailMakeCommand::class,
|
||||
'command.make:solution' => \Facade\Ignition\Commands\SolutionMakeCommand::class,
|
||||
'command.make:solution-provider' => \Facade\Ignition\Commands\SolutionProviderMakeCommand::class,
|
||||
'command.media-library:clean' => \Spatie\MediaLibrary\MediaCollections\Commands\CleanCommand::class,
|
||||
'command.media-library:clear' => \Spatie\MediaLibrary\MediaCollections\Commands\ClearCommand::class,
|
||||
'command.media-library:regenerate' => \Spatie\MediaLibrary\Conversions\Commands\RegenerateCommand::class,
|
||||
'command.middleware.make' => \Illuminate\Routing\Console\MiddlewareMakeCommand::class,
|
||||
'command.migrate' => \Illuminate\Database\Console\Migrations\MigrateCommand::class,
|
||||
'command.migrate.fresh' => \Illuminate\Database\Console\Migrations\FreshCommand::class,
|
||||
|
|
@ -1300,6 +1355,7 @@ namespace PHPSTORM_META {
|
|||
'flare.logger' => \Monolog\Logger::class,
|
||||
'hash' => \Illuminate\Hashing\HashManager::class,
|
||||
'hash.driver' => \Illuminate\Hashing\BcryptHasher::class,
|
||||
'image' => \Intervention\Image\ImageManager::class,
|
||||
'log' => \Illuminate\Log\LogManager::class,
|
||||
'mail.manager' => \Illuminate\Mail\MailManager::class,
|
||||
'mailer' => \Illuminate\Mail\Mailer::class,
|
||||
|
|
@ -1383,6 +1439,10 @@ namespace PHPSTORM_META {
|
|||
'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class,
|
||||
'Psr\Http\Message\ResponseInterface' => \Nyholm\Psr7\Response::class,
|
||||
'Psr\Http\Message\ServerRequestInterface' => \Nyholm\Psr7\ServerRequest::class,
|
||||
'Spatie\MediaLibrary\MediaCollections\Filesystem' => \Spatie\MediaLibrary\MediaCollections\Filesystem::class,
|
||||
'Spatie\MediaLibrary\MediaCollections\MediaRepository' => \Spatie\MediaLibrary\MediaCollections\MediaRepository::class,
|
||||
'Spatie\MediaLibrary\ResponsiveImages\TinyPlaceholderGenerator\TinyPlaceholderGenerator' => \Spatie\MediaLibrary\ResponsiveImages\TinyPlaceholderGenerator\Blurred::class,
|
||||
'Spatie\MediaLibrary\ResponsiveImages\WidthCalculator\WidthCalculator' => \Spatie\MediaLibrary\ResponsiveImages\WidthCalculator\FileSizeOptimizedWidthCalculator::class,
|
||||
'Whoops\Handler\HandlerInterface' => \Facade\Ignition\ErrorPage\IgnitionWhoopsHandler::class,
|
||||
'auth' => \Illuminate\Auth\AuthManager::class,
|
||||
'auth.driver' => \Illuminate\Auth\SessionGuard::class,
|
||||
|
|
@ -1423,6 +1483,9 @@ namespace PHPSTORM_META {
|
|||
'command.mail.make' => \Illuminate\Foundation\Console\MailMakeCommand::class,
|
||||
'command.make:solution' => \Facade\Ignition\Commands\SolutionMakeCommand::class,
|
||||
'command.make:solution-provider' => \Facade\Ignition\Commands\SolutionProviderMakeCommand::class,
|
||||
'command.media-library:clean' => \Spatie\MediaLibrary\MediaCollections\Commands\CleanCommand::class,
|
||||
'command.media-library:clear' => \Spatie\MediaLibrary\MediaCollections\Commands\ClearCommand::class,
|
||||
'command.media-library:regenerate' => \Spatie\MediaLibrary\Conversions\Commands\RegenerateCommand::class,
|
||||
'command.middleware.make' => \Illuminate\Routing\Console\MiddlewareMakeCommand::class,
|
||||
'command.migrate' => \Illuminate\Database\Console\Migrations\MigrateCommand::class,
|
||||
'command.migrate.fresh' => \Illuminate\Database\Console\Migrations\FreshCommand::class,
|
||||
|
|
@ -1488,6 +1551,7 @@ namespace PHPSTORM_META {
|
|||
'flare.logger' => \Monolog\Logger::class,
|
||||
'hash' => \Illuminate\Hashing\HashManager::class,
|
||||
'hash.driver' => \Illuminate\Hashing\BcryptHasher::class,
|
||||
'image' => \Intervention\Image\ImageManager::class,
|
||||
'log' => \Illuminate\Log\LogManager::class,
|
||||
'mail.manager' => \Illuminate\Mail\MailManager::class,
|
||||
'mailer' => \Illuminate\Mail\Mailer::class,
|
||||
|
|
@ -1571,6 +1635,10 @@ namespace PHPSTORM_META {
|
|||
'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class,
|
||||
'Psr\Http\Message\ResponseInterface' => \Nyholm\Psr7\Response::class,
|
||||
'Psr\Http\Message\ServerRequestInterface' => \Nyholm\Psr7\ServerRequest::class,
|
||||
'Spatie\MediaLibrary\MediaCollections\Filesystem' => \Spatie\MediaLibrary\MediaCollections\Filesystem::class,
|
||||
'Spatie\MediaLibrary\MediaCollections\MediaRepository' => \Spatie\MediaLibrary\MediaCollections\MediaRepository::class,
|
||||
'Spatie\MediaLibrary\ResponsiveImages\TinyPlaceholderGenerator\TinyPlaceholderGenerator' => \Spatie\MediaLibrary\ResponsiveImages\TinyPlaceholderGenerator\Blurred::class,
|
||||
'Spatie\MediaLibrary\ResponsiveImages\WidthCalculator\WidthCalculator' => \Spatie\MediaLibrary\ResponsiveImages\WidthCalculator\FileSizeOptimizedWidthCalculator::class,
|
||||
'Whoops\Handler\HandlerInterface' => \Facade\Ignition\ErrorPage\IgnitionWhoopsHandler::class,
|
||||
'auth' => \Illuminate\Auth\AuthManager::class,
|
||||
'auth.driver' => \Illuminate\Auth\SessionGuard::class,
|
||||
|
|
@ -1611,6 +1679,9 @@ namespace PHPSTORM_META {
|
|||
'command.mail.make' => \Illuminate\Foundation\Console\MailMakeCommand::class,
|
||||
'command.make:solution' => \Facade\Ignition\Commands\SolutionMakeCommand::class,
|
||||
'command.make:solution-provider' => \Facade\Ignition\Commands\SolutionProviderMakeCommand::class,
|
||||
'command.media-library:clean' => \Spatie\MediaLibrary\MediaCollections\Commands\CleanCommand::class,
|
||||
'command.media-library:clear' => \Spatie\MediaLibrary\MediaCollections\Commands\ClearCommand::class,
|
||||
'command.media-library:regenerate' => \Spatie\MediaLibrary\Conversions\Commands\RegenerateCommand::class,
|
||||
'command.middleware.make' => \Illuminate\Routing\Console\MiddlewareMakeCommand::class,
|
||||
'command.migrate' => \Illuminate\Database\Console\Migrations\MigrateCommand::class,
|
||||
'command.migrate.fresh' => \Illuminate\Database\Console\Migrations\FreshCommand::class,
|
||||
|
|
@ -1676,6 +1747,7 @@ namespace PHPSTORM_META {
|
|||
'flare.logger' => \Monolog\Logger::class,
|
||||
'hash' => \Illuminate\Hashing\HashManager::class,
|
||||
'hash.driver' => \Illuminate\Hashing\BcryptHasher::class,
|
||||
'image' => \Intervention\Image\ImageManager::class,
|
||||
'log' => \Illuminate\Log\LogManager::class,
|
||||
'mail.manager' => \Illuminate\Mail\MailManager::class,
|
||||
'mailer' => \Illuminate\Mail\Mailer::class,
|
||||
|
|
@ -1759,6 +1831,10 @@ namespace PHPSTORM_META {
|
|||
'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class,
|
||||
'Psr\Http\Message\ResponseInterface' => \Nyholm\Psr7\Response::class,
|
||||
'Psr\Http\Message\ServerRequestInterface' => \Nyholm\Psr7\ServerRequest::class,
|
||||
'Spatie\MediaLibrary\MediaCollections\Filesystem' => \Spatie\MediaLibrary\MediaCollections\Filesystem::class,
|
||||
'Spatie\MediaLibrary\MediaCollections\MediaRepository' => \Spatie\MediaLibrary\MediaCollections\MediaRepository::class,
|
||||
'Spatie\MediaLibrary\ResponsiveImages\TinyPlaceholderGenerator\TinyPlaceholderGenerator' => \Spatie\MediaLibrary\ResponsiveImages\TinyPlaceholderGenerator\Blurred::class,
|
||||
'Spatie\MediaLibrary\ResponsiveImages\WidthCalculator\WidthCalculator' => \Spatie\MediaLibrary\ResponsiveImages\WidthCalculator\FileSizeOptimizedWidthCalculator::class,
|
||||
'Whoops\Handler\HandlerInterface' => \Facade\Ignition\ErrorPage\IgnitionWhoopsHandler::class,
|
||||
'auth' => \Illuminate\Auth\AuthManager::class,
|
||||
'auth.driver' => \Illuminate\Auth\SessionGuard::class,
|
||||
|
|
@ -1799,6 +1875,9 @@ namespace PHPSTORM_META {
|
|||
'command.mail.make' => \Illuminate\Foundation\Console\MailMakeCommand::class,
|
||||
'command.make:solution' => \Facade\Ignition\Commands\SolutionMakeCommand::class,
|
||||
'command.make:solution-provider' => \Facade\Ignition\Commands\SolutionProviderMakeCommand::class,
|
||||
'command.media-library:clean' => \Spatie\MediaLibrary\MediaCollections\Commands\CleanCommand::class,
|
||||
'command.media-library:clear' => \Spatie\MediaLibrary\MediaCollections\Commands\ClearCommand::class,
|
||||
'command.media-library:regenerate' => \Spatie\MediaLibrary\Conversions\Commands\RegenerateCommand::class,
|
||||
'command.middleware.make' => \Illuminate\Routing\Console\MiddlewareMakeCommand::class,
|
||||
'command.migrate' => \Illuminate\Database\Console\Migrations\MigrateCommand::class,
|
||||
'command.migrate.fresh' => \Illuminate\Database\Console\Migrations\FreshCommand::class,
|
||||
|
|
@ -1864,6 +1943,7 @@ namespace PHPSTORM_META {
|
|||
'flare.logger' => \Monolog\Logger::class,
|
||||
'hash' => \Illuminate\Hashing\HashManager::class,
|
||||
'hash.driver' => \Illuminate\Hashing\BcryptHasher::class,
|
||||
'image' => \Intervention\Image\ImageManager::class,
|
||||
'log' => \Illuminate\Log\LogManager::class,
|
||||
'mail.manager' => \Illuminate\Mail\MailManager::class,
|
||||
'mailer' => \Illuminate\Mail\Mailer::class,
|
||||
|
|
@ -1947,6 +2027,10 @@ namespace PHPSTORM_META {
|
|||
'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class,
|
||||
'Psr\Http\Message\ResponseInterface' => \Nyholm\Psr7\Response::class,
|
||||
'Psr\Http\Message\ServerRequestInterface' => \Nyholm\Psr7\ServerRequest::class,
|
||||
'Spatie\MediaLibrary\MediaCollections\Filesystem' => \Spatie\MediaLibrary\MediaCollections\Filesystem::class,
|
||||
'Spatie\MediaLibrary\MediaCollections\MediaRepository' => \Spatie\MediaLibrary\MediaCollections\MediaRepository::class,
|
||||
'Spatie\MediaLibrary\ResponsiveImages\TinyPlaceholderGenerator\TinyPlaceholderGenerator' => \Spatie\MediaLibrary\ResponsiveImages\TinyPlaceholderGenerator\Blurred::class,
|
||||
'Spatie\MediaLibrary\ResponsiveImages\WidthCalculator\WidthCalculator' => \Spatie\MediaLibrary\ResponsiveImages\WidthCalculator\FileSizeOptimizedWidthCalculator::class,
|
||||
'Whoops\Handler\HandlerInterface' => \Facade\Ignition\ErrorPage\IgnitionWhoopsHandler::class,
|
||||
'auth' => \Illuminate\Auth\AuthManager::class,
|
||||
'auth.driver' => \Illuminate\Auth\SessionGuard::class,
|
||||
|
|
@ -1987,6 +2071,9 @@ namespace PHPSTORM_META {
|
|||
'command.mail.make' => \Illuminate\Foundation\Console\MailMakeCommand::class,
|
||||
'command.make:solution' => \Facade\Ignition\Commands\SolutionMakeCommand::class,
|
||||
'command.make:solution-provider' => \Facade\Ignition\Commands\SolutionProviderMakeCommand::class,
|
||||
'command.media-library:clean' => \Spatie\MediaLibrary\MediaCollections\Commands\CleanCommand::class,
|
||||
'command.media-library:clear' => \Spatie\MediaLibrary\MediaCollections\Commands\ClearCommand::class,
|
||||
'command.media-library:regenerate' => \Spatie\MediaLibrary\Conversions\Commands\RegenerateCommand::class,
|
||||
'command.middleware.make' => \Illuminate\Routing\Console\MiddlewareMakeCommand::class,
|
||||
'command.migrate' => \Illuminate\Database\Console\Migrations\MigrateCommand::class,
|
||||
'command.migrate.fresh' => \Illuminate\Database\Console\Migrations\FreshCommand::class,
|
||||
|
|
@ -2052,6 +2139,7 @@ namespace PHPSTORM_META {
|
|||
'flare.logger' => \Monolog\Logger::class,
|
||||
'hash' => \Illuminate\Hashing\HashManager::class,
|
||||
'hash.driver' => \Illuminate\Hashing\BcryptHasher::class,
|
||||
'image' => \Intervention\Image\ImageManager::class,
|
||||
'log' => \Illuminate\Log\LogManager::class,
|
||||
'mail.manager' => \Illuminate\Mail\MailManager::class,
|
||||
'mailer' => \Illuminate\Mail\Mailer::class,
|
||||
|
|
|
|||
|
|
@ -14941,6 +14941,70 @@
|
|||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace Intervention\Image\Facades {
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
class Image {
|
||||
/**
|
||||
* Overrides configuration settings
|
||||
*
|
||||
* @param array $config
|
||||
* @return self
|
||||
* @static
|
||||
*/
|
||||
public static function configure($config = [])
|
||||
{
|
||||
/** @var \Intervention\Image\ImageManager $instance */
|
||||
return $instance->configure($config);
|
||||
}
|
||||
/**
|
||||
* Initiates an Image instance from different input types
|
||||
*
|
||||
* @param mixed $data
|
||||
* @return \Intervention\Image\Image
|
||||
* @static
|
||||
*/
|
||||
public static function make($data)
|
||||
{
|
||||
/** @var \Intervention\Image\ImageManager $instance */
|
||||
return $instance->make($data);
|
||||
}
|
||||
/**
|
||||
* Creates an empty image canvas
|
||||
*
|
||||
* @param int $width
|
||||
* @param int $height
|
||||
* @param mixed $background
|
||||
* @return \Intervention\Image\Image
|
||||
* @static
|
||||
*/
|
||||
public static function canvas($width, $height, $background = null)
|
||||
{
|
||||
/** @var \Intervention\Image\ImageManager $instance */
|
||||
return $instance->canvas($width, $height, $background);
|
||||
}
|
||||
/**
|
||||
* Create new cached image and run callback
|
||||
* (requires additional package intervention/imagecache)
|
||||
*
|
||||
* @param \Closure $callback
|
||||
* @param int $lifetime
|
||||
* @param boolean $returnObj
|
||||
* @return \Image
|
||||
* @static
|
||||
*/
|
||||
public static function cache($callback, $lifetime = null, $returnObj = false)
|
||||
{
|
||||
/** @var \Intervention\Image\ImageManager $instance */
|
||||
return $instance->cache($callback, $lifetime, $returnObj);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace Illuminate\Http {
|
||||
|
|
@ -18179,6 +18243,7 @@ namespace {
|
|||
class View extends \Illuminate\Support\Facades\View {}
|
||||
class JsonApi extends \CloudCreativity\LaravelJsonApi\Facades\JsonApi {}
|
||||
class Flare extends \Facade\Ignition\Facades\Flare {}
|
||||
class Image extends \Intervention\Image\Facades\Image {}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -155,6 +155,8 @@ class RecipeController extends Controller
|
|||
'name' => ['required', 'string'],
|
||||
'description' => ['nullable', 'string'],
|
||||
'description_delta' => ['nullable', 'string'],
|
||||
'image' => ['nullable', 'file', 'mimes:jpg,png,gif'],
|
||||
'remove_image' => ['nullable', 'boolean'],
|
||||
'servings' => ['required', 'numeric'],
|
||||
'time_prep' => ['nullable', 'numeric'],
|
||||
'time_active' => ['nullable', 'numeric'],
|
||||
|
|
@ -256,6 +258,21 @@ class RecipeController extends Controller
|
|||
$recipe->syncTags(explode(',', $tags));
|
||||
}
|
||||
|
||||
// Handle recipe image.
|
||||
if (!empty($input['image'])) {
|
||||
/** @var \Illuminate\Http\UploadedFile $file */
|
||||
$file = $input['image'];
|
||||
$recipe->clearMediaCollection();
|
||||
$recipe
|
||||
->addMediaFromRequest('image')
|
||||
->usingName($recipe->name)
|
||||
->usingFileName("{$recipe->slug}.{$file->extension()}")
|
||||
->toMediaCollection();
|
||||
}
|
||||
elseif (isset($input['remove_image']) && (bool) $input['remove_image']) {
|
||||
$recipe->clearMediaCollection();
|
||||
}
|
||||
|
||||
session()->flash('message', "Recipe {$recipe->name} updated!");
|
||||
return redirect()->route('recipes.show', $recipe);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,9 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Laravel\Scout\Searchable;
|
||||
use Spatie\MediaLibrary\HasMedia;
|
||||
use Spatie\MediaLibrary\InteractsWithMedia;
|
||||
use Spatie\MediaLibrary\MediaCollections\Models\Media;
|
||||
use Spatie\Tags\HasTags;
|
||||
|
||||
/**
|
||||
|
|
@ -64,12 +67,13 @@ use Spatie\Tags\HasTags;
|
|||
* @property string|null $description_delta
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Recipe whereDescriptionDelta($value)
|
||||
*/
|
||||
final class Recipe extends Model
|
||||
final class Recipe extends Model implements HasMedia
|
||||
{
|
||||
use HasFactory;
|
||||
use HasIngredients;
|
||||
use HasTags;
|
||||
use Ingredient;
|
||||
use InteractsWithMedia;
|
||||
use Journalable;
|
||||
use QueryDsl;
|
||||
use Searchable;
|
||||
|
|
@ -189,4 +193,19 @@ final class Recipe extends Model
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines conversions for the Recipe image.
|
||||
*
|
||||
* @throws \Spatie\Image\Exceptions\InvalidManipulation
|
||||
*
|
||||
* @see https://spatie.be/docs/laravel-medialibrary/v9/converting-images/defining-conversions
|
||||
*/
|
||||
public function registerMediaConversions(Media $media = null): void
|
||||
{
|
||||
$this->addMediaConversion('preview')
|
||||
->width(368)
|
||||
->height(232)
|
||||
->sharpen(10);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
"laravel/scout": "^8.6",
|
||||
"laravel/tinker": "^2.5",
|
||||
"phospr/fraction": "^1.2",
|
||||
"spatie/laravel-medialibrary": "^9.0.0",
|
||||
"spatie/laravel-tags": "^3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
|
|
|
|||
|
|
@ -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": "7ceaed365c3962d66d301ae612a52e9f",
|
||||
"content-hash": "661105534dbdf7707554b24e2fbf2aeb",
|
||||
"packages": [
|
||||
{
|
||||
"name": "asm89/stack-cors",
|
||||
|
|
@ -1661,6 +1661,80 @@
|
|||
},
|
||||
"time": "2020-09-30T07:37:11+00:00"
|
||||
},
|
||||
{
|
||||
"name": "intervention/image",
|
||||
"version": "2.5.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Intervention/image.git",
|
||||
"reference": "abbf18d5ab8367f96b3205ca3c89fb2fa598c69e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/Intervention/image/zipball/abbf18d5ab8367f96b3205ca3c89fb2fa598c69e",
|
||||
"reference": "abbf18d5ab8367f96b3205ca3c89fb2fa598c69e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-fileinfo": "*",
|
||||
"guzzlehttp/psr7": "~1.1",
|
||||
"php": ">=5.4.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"mockery/mockery": "~0.9.2",
|
||||
"phpunit/phpunit": "^4.8 || ^5.7"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-gd": "to use GD library based image processing.",
|
||||
"ext-imagick": "to use Imagick based image processing.",
|
||||
"intervention/imagecache": "Caching extension for the Intervention Image library"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.4-dev"
|
||||
},
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"Intervention\\Image\\ImageServiceProvider"
|
||||
],
|
||||
"aliases": {
|
||||
"Image": "Intervention\\Image\\Facades\\Image"
|
||||
}
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Intervention\\Image\\": "src/Intervention/Image"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Oliver Vogel",
|
||||
"email": "oliver@olivervogel.com",
|
||||
"homepage": "http://olivervogel.com/"
|
||||
}
|
||||
],
|
||||
"description": "Image handling and manipulation library with support for Laravel integration",
|
||||
"homepage": "http://image.intervention.io/",
|
||||
"keywords": [
|
||||
"gd",
|
||||
"image",
|
||||
"imagick",
|
||||
"laravel",
|
||||
"thumbnail",
|
||||
"watermark"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/Intervention/image/issues",
|
||||
"source": "https://github.com/Intervention/image/tree/master"
|
||||
},
|
||||
"time": "2019-11-02T09:15:47+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/framework",
|
||||
"version": "v8.31.0",
|
||||
|
|
@ -2162,6 +2236,71 @@
|
|||
],
|
||||
"time": "2020-08-23T07:39:11+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/glide",
|
||||
"version": "1.7.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thephpleague/glide.git",
|
||||
"reference": "ae5e26700573cb678919d28e425a8b87bc71c546"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thephpleague/glide/zipball/ae5e26700573cb678919d28e425a8b87bc71c546",
|
||||
"reference": "ae5e26700573cb678919d28e425a8b87bc71c546",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"intervention/image": "^2.4",
|
||||
"league/flysystem": "^1.0",
|
||||
"php": "^7.2|^8.0",
|
||||
"psr/http-message": "^1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"mockery/mockery": "^1.3.3",
|
||||
"phpunit/php-token-stream": "^3.1|^4.0",
|
||||
"phpunit/phpunit": "^8.5|^9.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.1-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"League\\Glide\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Jonathan Reinink",
|
||||
"email": "jonathan@reinink.ca",
|
||||
"homepage": "http://reinink.ca"
|
||||
}
|
||||
],
|
||||
"description": "Wonderfully easy on-demand image manipulation library with an HTTP based API.",
|
||||
"homepage": "http://glide.thephpleague.com",
|
||||
"keywords": [
|
||||
"ImageMagick",
|
||||
"editing",
|
||||
"gd",
|
||||
"image",
|
||||
"imagick",
|
||||
"league",
|
||||
"manipulation",
|
||||
"processing"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/thephpleague/glide/issues",
|
||||
"source": "https://github.com/thephpleague/glide/tree/1.7.0"
|
||||
},
|
||||
"time": "2020-11-05T17:34:03+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/mime-type-detection",
|
||||
"version": "1.7.0",
|
||||
|
|
@ -2218,6 +2357,77 @@
|
|||
],
|
||||
"time": "2021-01-18T20:58:21+00:00"
|
||||
},
|
||||
{
|
||||
"name": "maennchen/zipstream-php",
|
||||
"version": "2.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/maennchen/ZipStream-PHP.git",
|
||||
"reference": "c4c5803cc1f93df3d2448478ef79394a5981cc58"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/c4c5803cc1f93df3d2448478ef79394a5981cc58",
|
||||
"reference": "c4c5803cc1f93df3d2448478ef79394a5981cc58",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"myclabs/php-enum": "^1.5",
|
||||
"php": ">= 7.1",
|
||||
"psr/http-message": "^1.0",
|
||||
"symfony/polyfill-mbstring": "^1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-zip": "*",
|
||||
"guzzlehttp/guzzle": ">= 6.3",
|
||||
"mikey179/vfsstream": "^1.6",
|
||||
"phpunit/phpunit": ">= 7.5"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"ZipStream\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Paul Duncan",
|
||||
"email": "pabs@pablotron.org"
|
||||
},
|
||||
{
|
||||
"name": "Jonatan Männchen",
|
||||
"email": "jonatan@maennchen.ch"
|
||||
},
|
||||
{
|
||||
"name": "Jesse Donat",
|
||||
"email": "donatj@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "András Kolesár",
|
||||
"email": "kolesar@kolesar.hu"
|
||||
}
|
||||
],
|
||||
"description": "ZipStream is a library for dynamically streaming dynamic zip files from PHP without writing to the disk at all on the server.",
|
||||
"keywords": [
|
||||
"stream",
|
||||
"zip"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/maennchen/ZipStream-PHP/issues",
|
||||
"source": "https://github.com/maennchen/ZipStream-PHP/tree/master"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://opencollective.com/zipstream",
|
||||
"type": "open_collective"
|
||||
}
|
||||
],
|
||||
"time": "2020-05-30T13:11:16+00:00"
|
||||
},
|
||||
{
|
||||
"name": "monolog/monolog",
|
||||
"version": "2.2.0",
|
||||
|
|
@ -2314,6 +2524,66 @@
|
|||
],
|
||||
"time": "2020-12-14T13:15:25+00:00"
|
||||
},
|
||||
{
|
||||
"name": "myclabs/php-enum",
|
||||
"version": "1.8.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/myclabs/php-enum.git",
|
||||
"reference": "46cf3d8498b095bd33727b13fd5707263af99421"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/myclabs/php-enum/zipball/46cf3d8498b095bd33727b13fd5707263af99421",
|
||||
"reference": "46cf3d8498b095bd33727b13fd5707263af99421",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-json": "*",
|
||||
"php": "^7.3 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^9.5",
|
||||
"squizlabs/php_codesniffer": "1.*",
|
||||
"vimeo/psalm": "^4.5.1"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"MyCLabs\\Enum\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "PHP Enum contributors",
|
||||
"homepage": "https://github.com/myclabs/php-enum/graphs/contributors"
|
||||
}
|
||||
],
|
||||
"description": "PHP Enum implementation",
|
||||
"homepage": "http://github.com/myclabs/php-enum",
|
||||
"keywords": [
|
||||
"enum"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/myclabs/php-enum/issues",
|
||||
"source": "https://github.com/myclabs/php-enum/tree/1.8.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/mnapoli",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/myclabs/php-enum",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-02-15T16:11:48+00:00"
|
||||
},
|
||||
{
|
||||
"name": "neomerx/json-api",
|
||||
"version": "v1.0.9",
|
||||
|
|
@ -3601,6 +3871,233 @@
|
|||
],
|
||||
"time": "2021-01-18T00:32:12+00:00"
|
||||
},
|
||||
{
|
||||
"name": "spatie/image",
|
||||
"version": "1.10.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/spatie/image.git",
|
||||
"reference": "7ea129bc7b7521864c5a540e3b1c14ea194316d3"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/spatie/image/zipball/7ea129bc7b7521864c5a540e3b1c14ea194316d3",
|
||||
"reference": "7ea129bc7b7521864c5a540e3b1c14ea194316d3",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-exif": "*",
|
||||
"ext-json": "*",
|
||||
"ext-mbstring": "*",
|
||||
"league/glide": "^1.6",
|
||||
"php": "^7.2|^8.0",
|
||||
"spatie/image-optimizer": "^1.1",
|
||||
"spatie/temporary-directory": "^1.0",
|
||||
"symfony/process": "^3.0|^4.0|^5.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^8.0|^9.0",
|
||||
"symfony/var-dumper": "^4.0|^5.0",
|
||||
"vimeo/psalm": "^4.6"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Spatie\\Image\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Freek Van der Herten",
|
||||
"email": "freek@spatie.be",
|
||||
"homepage": "https://spatie.be",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"description": "Manipulate images with an expressive API",
|
||||
"homepage": "https://github.com/spatie/image",
|
||||
"keywords": [
|
||||
"image",
|
||||
"spatie"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/spatie/image/issues",
|
||||
"source": "https://github.com/spatie/image/tree/1.10.4"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://spatie.be/open-source/support-us",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/spatie",
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-03-10T16:11:40+00:00"
|
||||
},
|
||||
{
|
||||
"name": "spatie/image-optimizer",
|
||||
"version": "1.3.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/spatie/image-optimizer.git",
|
||||
"reference": "6aa170eb292758553d332efee5e0c3977341080c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/spatie/image-optimizer/zipball/6aa170eb292758553d332efee5e0c3977341080c",
|
||||
"reference": "6aa170eb292758553d332efee5e0c3977341080c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-fileinfo": "*",
|
||||
"php": "^7.2|^8.0",
|
||||
"psr/log": "^1.0",
|
||||
"symfony/process": "^4.2|^5.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^8.0|^9.0",
|
||||
"symfony/var-dumper": "^4.2|^5.0"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Spatie\\ImageOptimizer\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Freek Van der Herten",
|
||||
"email": "freek@spatie.be",
|
||||
"homepage": "https://spatie.be",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"description": "Easily optimize images using PHP",
|
||||
"homepage": "https://github.com/spatie/image-optimizer",
|
||||
"keywords": [
|
||||
"image-optimizer",
|
||||
"spatie"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/spatie/image-optimizer/issues",
|
||||
"source": "https://github.com/spatie/image-optimizer/tree/1.3.2"
|
||||
},
|
||||
"time": "2020-11-28T12:37:58+00:00"
|
||||
},
|
||||
{
|
||||
"name": "spatie/laravel-medialibrary",
|
||||
"version": "9.4.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/spatie/laravel-medialibrary.git",
|
||||
"reference": "2eae7416a6d7762e147f26f6cac7cf099eda109b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/spatie/laravel-medialibrary/zipball/2eae7416a6d7762e147f26f6cac7cf099eda109b",
|
||||
"reference": "2eae7416a6d7762e147f26f6cac7cf099eda109b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-exif": "*",
|
||||
"ext-fileinfo": "*",
|
||||
"ext-json": "*",
|
||||
"illuminate/bus": "^7.0|^8.0",
|
||||
"illuminate/console": "^7.0|^8.0",
|
||||
"illuminate/database": "^7.0|^8.0",
|
||||
"illuminate/pipeline": "^7.0|^8.0",
|
||||
"illuminate/support": "^7.0|^8.0",
|
||||
"league/flysystem": "^1.0.64",
|
||||
"maennchen/zipstream-php": "^1.0|^2.0",
|
||||
"php": "^7.4|^8.0",
|
||||
"spatie/image": "^1.4.0",
|
||||
"spatie/temporary-directory": "^1.1",
|
||||
"symfony/console": "^4.4|^5.0"
|
||||
},
|
||||
"conflict": {
|
||||
"php-ffmpeg/php-ffmpeg": "<0.6.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"aws/aws-sdk-php": "^3.133.11",
|
||||
"doctrine/dbal": "^2.5.2",
|
||||
"ext-pdo_sqlite": "*",
|
||||
"ext-zip": "*",
|
||||
"guzzlehttp/guzzle": "^6.3|^7.0",
|
||||
"league/flysystem-aws-s3-v3": "^1.0.23",
|
||||
"mockery/mockery": "^1.3",
|
||||
"orchestra/testbench": "^5.0|^6.0",
|
||||
"phpunit/phpunit": "^9.1",
|
||||
"spatie/pdf-to-image": "^2.0",
|
||||
"spatie/phpunit-snapshot-assertions": "^4.0"
|
||||
},
|
||||
"suggest": {
|
||||
"league/flysystem-aws-s3-v3": "Required to use AWS S3 file storage",
|
||||
"php-ffmpeg/php-ffmpeg": "Required for generating video thumbnails",
|
||||
"spatie/pdf-to-image": "Required for generating thumbsnails of PDFs and SVGs"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"Spatie\\MediaLibrary\\MediaLibraryServiceProvider"
|
||||
]
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Spatie\\MediaLibrary\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Freek Van der Herten",
|
||||
"email": "freek@spatie.be",
|
||||
"homepage": "https://spatie.be",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"description": "Associate files with Eloquent models",
|
||||
"homepage": "https://github.com/spatie/laravel-medialibrary",
|
||||
"keywords": [
|
||||
"cms",
|
||||
"conversion",
|
||||
"downloads",
|
||||
"images",
|
||||
"laravel",
|
||||
"laravel-medialibrary",
|
||||
"media",
|
||||
"spatie"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/spatie/laravel-medialibrary/issues",
|
||||
"source": "https://github.com/spatie/laravel-medialibrary/tree/9.4.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://spatie.be/open-source/support-us",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/spatie",
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-03-07T18:42:19+00:00"
|
||||
},
|
||||
{
|
||||
"name": "spatie/laravel-tags",
|
||||
"version": "3.1.0",
|
||||
|
|
@ -3751,6 +4248,57 @@
|
|||
],
|
||||
"time": "2020-11-19T14:19:29+00:00"
|
||||
},
|
||||
{
|
||||
"name": "spatie/temporary-directory",
|
||||
"version": "1.3.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/spatie/temporary-directory.git",
|
||||
"reference": "f517729b3793bca58f847c5fd383ec16f03ffec6"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/spatie/temporary-directory/zipball/f517729b3793bca58f847c5fd383ec16f03ffec6",
|
||||
"reference": "f517729b3793bca58f847c5fd383ec16f03ffec6",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.2|^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^8.0|^9.0"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Spatie\\TemporaryDirectory\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Alex Vanderbist",
|
||||
"email": "alex@spatie.be",
|
||||
"homepage": "https://spatie.be",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"description": "Easily create, use and destroy temporary directories",
|
||||
"homepage": "https://github.com/spatie/temporary-directory",
|
||||
"keywords": [
|
||||
"php",
|
||||
"spatie",
|
||||
"temporary-directory"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/spatie/temporary-directory/issues",
|
||||
"source": "https://github.com/spatie/temporary-directory/tree/1.3.0"
|
||||
},
|
||||
"time": "2020-11-09T15:54:21+00:00"
|
||||
},
|
||||
{
|
||||
"name": "swiftmailer/swiftmailer",
|
||||
"version": "v6.2.5",
|
||||
|
|
|
|||
|
|
@ -42,6 +42,12 @@ return [
|
|||
'visibility' => 'public',
|
||||
],
|
||||
|
||||
'media' => [
|
||||
'driver' => 'local',
|
||||
'root' => public_path('media'),
|
||||
'url' => env('APP_URL').'/media',
|
||||
],
|
||||
|
||||
's3' => [
|
||||
'driver' => 's3',
|
||||
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||
|
|
|
|||
|
|
@ -0,0 +1,215 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
* The disk on which to store added files and derived images by default. Choose
|
||||
* one or more of the disks you've configured in config/filesystems.php.
|
||||
*/
|
||||
'disk_name' => env('MEDIA_DISK', 'media'),
|
||||
|
||||
/*
|
||||
* The maximum file size of an item in bytes.
|
||||
* Adding a larger file will result in an exception.
|
||||
*/
|
||||
'max_file_size' => 1024 * 1024 * 10,
|
||||
|
||||
/*
|
||||
* This queue will be used to generate derived and responsive images.
|
||||
* Leave empty to use the default queue.
|
||||
*/
|
||||
'queue_name' => '',
|
||||
|
||||
/*
|
||||
* By default all conversions will be performed on a queue.
|
||||
*/
|
||||
'queue_conversions_by_default' => env('QUEUE_CONVERSIONS_BY_DEFAULT', true),
|
||||
|
||||
/*
|
||||
* The fully qualified class name of the media model.
|
||||
*/
|
||||
'media_model' => Spatie\MediaLibrary\MediaCollections\Models\Media::class,
|
||||
|
||||
/*
|
||||
* The fully qualified class name of the model used for temporary uploads.
|
||||
*
|
||||
* This model is only used in Media Library Pro (https://medialibrary.pro)
|
||||
*/
|
||||
'temporary_upload_model' => Spatie\MediaLibraryPro\Models\TemporaryUpload::class,
|
||||
|
||||
/*
|
||||
* When enabled, Media Library Pro will only process temporary uploads there were uploaded
|
||||
* in the same session. You can opt to disable this for stateless usage of
|
||||
* the pro components.
|
||||
*/
|
||||
'enable_temporary_uploads_session_affinity' => true,
|
||||
|
||||
/*
|
||||
* When enabled, Media Library pro will generate thumbnails for uploaded file.
|
||||
*/
|
||||
'generate_thumbnails_for_temporary_uploads' => true,
|
||||
|
||||
/*
|
||||
* This is the class that is responsible for naming generated files.
|
||||
*/
|
||||
'file_namer' => Spatie\MediaLibrary\Support\FileNamer\DefaultFileNamer::class,
|
||||
|
||||
/*
|
||||
* The class that contains the strategy for determining a media file's path.
|
||||
*/
|
||||
'path_generator' => Spatie\MediaLibrary\Support\PathGenerator\DefaultPathGenerator::class,
|
||||
|
||||
/*
|
||||
* When urls to files get generated, this class will be called. Use the default
|
||||
* if your files are stored locally above the site root or on s3.
|
||||
*/
|
||||
'url_generator' => Spatie\MediaLibrary\Support\UrlGenerator\DefaultUrlGenerator::class,
|
||||
|
||||
/*
|
||||
* Moves media on updating to keep path consistent. Enable it only with a custom
|
||||
* PathGenerator that uses, for example, the media UUID.
|
||||
*/
|
||||
'moves_media_on_update' => false,
|
||||
|
||||
/*
|
||||
* Whether to activate versioning when urls to files get generated.
|
||||
* When activated, this attaches a ?v=xx query string to the URL.
|
||||
*/
|
||||
'version_urls' => false,
|
||||
|
||||
/*
|
||||
* The media library will try to optimize all converted images by removing
|
||||
* metadata and applying a little bit of compression. These are
|
||||
* the optimizers that will be used by default.
|
||||
*/
|
||||
'image_optimizers' => [
|
||||
Spatie\ImageOptimizer\Optimizers\Jpegoptim::class => [
|
||||
'-m85', // set maximum quality to 85%
|
||||
'--strip-all', // this strips out all text information such as comments and EXIF data
|
||||
'--all-progressive', // this will make sure the resulting image is a progressive one
|
||||
],
|
||||
Spatie\ImageOptimizer\Optimizers\Pngquant::class => [
|
||||
'--force', // required parameter for this package
|
||||
],
|
||||
Spatie\ImageOptimizer\Optimizers\Optipng::class => [
|
||||
'-i0', // this will result in a non-interlaced, progressive scanned image
|
||||
'-o2', // this set the optimization level to two (multiple IDAT compression trials)
|
||||
'-quiet', // required parameter for this package
|
||||
],
|
||||
Spatie\ImageOptimizer\Optimizers\Svgo::class => [
|
||||
'--disable=cleanupIDs', // disabling because it is known to cause troubles
|
||||
],
|
||||
Spatie\ImageOptimizer\Optimizers\Gifsicle::class => [
|
||||
'-b', // required parameter for this package
|
||||
'-O3', // this produces the slowest but best results
|
||||
],
|
||||
Spatie\ImageOptimizer\Optimizers\Cwebp::class => [
|
||||
'-m 6', // for the slowest compression method in order to get the best compression.
|
||||
'-pass 10', // for maximizing the amount of analysis pass.
|
||||
'-mt', // multithreading for some speed improvements.
|
||||
'-q 90', //quality factor that brings the least noticeable changes.
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
* These generators will be used to create an image of media files.
|
||||
*/
|
||||
'image_generators' => [
|
||||
Spatie\MediaLibrary\Conversions\ImageGenerators\Image::class,
|
||||
Spatie\MediaLibrary\Conversions\ImageGenerators\Webp::class,
|
||||
Spatie\MediaLibrary\Conversions\ImageGenerators\Pdf::class,
|
||||
Spatie\MediaLibrary\Conversions\ImageGenerators\Svg::class,
|
||||
Spatie\MediaLibrary\Conversions\ImageGenerators\Video::class,
|
||||
],
|
||||
|
||||
/*
|
||||
* The path where to store temporary files while performing image conversions.
|
||||
* If set to null, storage_path('media-library/temp') will be used.
|
||||
*/
|
||||
'temporary_directory_path' => null,
|
||||
|
||||
/*
|
||||
* The engine that should perform the image conversions.
|
||||
* Should be either `gd` or `imagick`.
|
||||
*/
|
||||
'image_driver' => env('IMAGE_DRIVER', 'gd'),
|
||||
|
||||
/*
|
||||
* FFMPEG & FFProbe binaries paths, only used if you try to generate video
|
||||
* thumbnails and have installed the php-ffmpeg/php-ffmpeg composer
|
||||
* dependency.
|
||||
*/
|
||||
'ffmpeg_path' => env('FFMPEG_PATH', '/usr/bin/ffmpeg'),
|
||||
'ffprobe_path' => env('FFPROBE_PATH', '/usr/bin/ffprobe'),
|
||||
|
||||
/*
|
||||
* Here you can override the class names of the jobs used by this package. Make sure
|
||||
* your custom jobs extend the ones provided by the package.
|
||||
*/
|
||||
'jobs' => [
|
||||
'perform_conversions' => Spatie\MediaLibrary\Conversions\Jobs\PerformConversionsJob::class,
|
||||
'generate_responsive_images' => Spatie\MediaLibrary\ResponsiveImages\Jobs\GenerateResponsiveImagesJob::class,
|
||||
],
|
||||
|
||||
/*
|
||||
* When using the addMediaFromUrl method you may want to replace the default downloader.
|
||||
* This is particularly useful when the url of the image is behind a firewall and
|
||||
* need to add additional flags, possibly using curl.
|
||||
*/
|
||||
'media_downloader' => Spatie\MediaLibrary\Downloaders\DefaultDownloader::class,
|
||||
|
||||
'remote' => [
|
||||
/*
|
||||
* Any extra headers that should be included when uploading media to
|
||||
* a remote disk. Even though supported headers may vary between
|
||||
* different drivers, a sensible default has been provided.
|
||||
*
|
||||
* Supported by S3: CacheControl, Expires, StorageClass,
|
||||
* ServerSideEncryption, Metadata, ACL, ContentEncoding
|
||||
*/
|
||||
'extra_headers' => [
|
||||
'CacheControl' => 'max-age=604800',
|
||||
],
|
||||
],
|
||||
|
||||
'responsive_images' => [
|
||||
/*
|
||||
* This class is responsible for calculating the target widths of the responsive
|
||||
* images. By default we optimize for filesize and create variations that each are 20%
|
||||
* smaller than the previous one. More info in the documentation.
|
||||
*
|
||||
* https://docs.spatie.be/laravel-medialibrary/v9/advanced-usage/generating-responsive-images
|
||||
*/
|
||||
'width_calculator' => Spatie\MediaLibrary\ResponsiveImages\WidthCalculator\FileSizeOptimizedWidthCalculator::class,
|
||||
|
||||
/*
|
||||
* By default rendering media to a responsive image will add some javascript and a tiny placeholder.
|
||||
* This ensures that the browser can already determine the correct layout.
|
||||
*/
|
||||
'use_tiny_placeholders' => true,
|
||||
|
||||
/*
|
||||
* This class will generate the tiny placeholder used for progressive image loading. By default
|
||||
* the media library will use a tiny blurred jpg image.
|
||||
*/
|
||||
'tiny_placeholder_generator' => Spatie\MediaLibrary\ResponsiveImages\TinyPlaceholderGenerator\Blurred::class,
|
||||
],
|
||||
|
||||
/*
|
||||
* When enabling this option, a route will be registered that will enable
|
||||
* the Media Library Pro Vue and React components to move uploaded files
|
||||
* in a S3 bucket to their right place.
|
||||
*/
|
||||
'enable_vapor_uploads' => env('ENABLE_MEDIA_LIBRARY_VAPOR_UPLOADS', false),
|
||||
|
||||
/*
|
||||
* When converting Media instances to response the media library will add
|
||||
* a `loading` attribute to the `img` tag. Here you can set the default
|
||||
* value of that attribute.
|
||||
*
|
||||
* Possible values: 'lazy', 'eager', 'auto' or null if you don't want to set any loading instruction.
|
||||
*
|
||||
* More info: https://css-tricks.com/native-lazy-loading/
|
||||
*/
|
||||
'default_loading_attribute_value' => null,
|
||||
];
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateMediaTable extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::create('media', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
|
||||
$table->morphs('model');
|
||||
$table->uuid('uuid')->nullable()->unique();
|
||||
$table->string('collection_name');
|
||||
$table->string('name');
|
||||
$table->string('file_name');
|
||||
$table->string('mime_type')->nullable();
|
||||
$table->string('disk');
|
||||
$table->string('conversions_disk')->nullable();
|
||||
$table->unsignedBigInteger('size');
|
||||
$table->json('manipulations');
|
||||
$table->json('custom_properties');
|
||||
$table->json('generated_conversions');
|
||||
$table->json('responsive_images');
|
||||
$table->unsignedInteger('order_column')->nullable();
|
||||
|
||||
$table->nullableTimestamps();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
*
|
||||
!.gitignore
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
@props(['disabled' => false])
|
||||
|
||||
<input type="file"
|
||||
{{ $disabled ? 'disabled' : '' }}
|
||||
{!! $attributes->merge(['class' => 'focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50']) !!}>
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
<x-slot name="header">
|
||||
<h1 class="font-semibold text-xl text-gray-800 leading-tight">{{ $title }}</h1>
|
||||
</x-slot>
|
||||
<form method="POST" action="{{ ($recipe->exists ? route('recipes.update', $recipe) : route('recipes.store')) }}">
|
||||
<form method="POST" enctype="multipart/form-data" action="{{ ($recipe->exists ? route('recipes.update', $recipe) : route('recipes.store')) }}">
|
||||
@if ($recipe->exists)@method('put')@endif
|
||||
@csrf
|
||||
<div class="flex flex-col space-y-4 md:flex-row md:space-x-4 md:space-y-0">
|
||||
|
|
@ -67,6 +67,33 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="flex flex-col space-y-4 mt-4">
|
||||
<!-- Image -->
|
||||
<div class="flex flex-col space-y-4 md:flex-row md:space-x-4 md:space-y-0">
|
||||
@if($recipe->hasMedia())
|
||||
<div>
|
||||
<div class="block font-medium text-sm text-gray-700 mb-1">Current image</div>
|
||||
<a href="{{ $recipe->getFirstMedia()->getFullUrl() }}" target="_blank">
|
||||
{{ $recipe->getFirstMedia()('preview') }}
|
||||
</a>
|
||||
<fieldset class="flex space-x-2 mt-1 items-center">
|
||||
<x-inputs.label for="remove_image" class="text-red-800" value="Remove this image" />
|
||||
<x-inputs.input type="checkbox" name="remove_image" value="1" />
|
||||
</fieldset>
|
||||
</div>
|
||||
@endif
|
||||
<div>
|
||||
@if($recipe->hasMedia())
|
||||
<x-inputs.label for="image" value="Replace image" />
|
||||
@else
|
||||
<x-inputs.label for="image" value="Add image" />
|
||||
@endif
|
||||
|
||||
<x-inputs.file name="image"
|
||||
class="block mt-1 w-full"
|
||||
accept="image/png, image/jpeg"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Description -->
|
||||
<div>
|
||||
<x-inputs.label for="description" value="Description" />
|
||||
|
|
@ -83,7 +110,7 @@
|
|||
</div>
|
||||
|
||||
<!-- Source -->
|
||||
<div class="flex-auto">
|
||||
<div>
|
||||
<x-inputs.label for="source" value="Source" />
|
||||
|
||||
<x-inputs.input name="source"
|
||||
|
|
|
|||
Loading…
Reference in New Issue