mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2025-02-14 17:24:22 +01:00
Fix model binding when using cached routes, install imagick in container
This commit is contained in:
parent
860edbf533
commit
293fd535c4
2 changed files with 8 additions and 6 deletions
|
@ -42,7 +42,7 @@ COPY --from=atomicparsley_builder /tmp/atomicparsley/AtomicParsley /usr/local/bi
|
||||||
|
|
||||||
## Common libraries required for ffmpeg & atomicparsley` to work
|
## Common libraries required for ffmpeg & atomicparsley` to work
|
||||||
RUN apk add --no-cache libgcc libstdc++ ca-certificates libcrypto1.1 libssl1.1 libgomp expat git
|
RUN apk add --no-cache libgcc libstdc++ ca-certificates libcrypto1.1 libssl1.1 libgomp expat git
|
||||||
RUN apk add --no-cache nginx sudo
|
RUN apk add --no-cache nginx sudo imagemagick
|
||||||
|
|
||||||
# Install php extensions
|
# Install php extensions
|
||||||
RUN install-php-extensions mysqli pgsql pdo_mysql pdo_pgsql gmp gmagick redis
|
RUN install-php-extensions mysqli pgsql pdo_mysql pdo_pgsql gmp gmagick redis
|
||||||
|
|
|
@ -48,12 +48,14 @@ class RouteServiceProvider extends ServiceProvider
|
||||||
{
|
{
|
||||||
$this->configureRateLimiting();
|
$this->configureRateLimiting();
|
||||||
|
|
||||||
$this->routes(function () {
|
// Ensure route bindings are out of the `$this->routes()` callable, otherwise route caching won't
|
||||||
|
// take our custom bindings into account.
|
||||||
Route::model('userId', User::class);
|
Route::model('userId', User::class);
|
||||||
Route::bind('userSlug', function ($value) {
|
Route::bind('userSlug', function ($value) {
|
||||||
return User::where('slug', $value)->first();
|
return User::where('slug', $value)->first();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$this->routes(function () {
|
||||||
Route::prefix('api')
|
Route::prefix('api')
|
||||||
->middleware('api')
|
->middleware('api')
|
||||||
->group(base_path('routes/api.php'));
|
->group(base_path('routes/api.php'));
|
||||||
|
|
Loading…
Reference in a new issue