AppServiceProvider.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. namespace App\Providers;
  3. use App\Billing\Stripe;
  4. use App\Post;
  5. use Illuminate\Foundation\Application;
  6. use Illuminate\Support\ServiceProvider;
  7. class AppServiceProvider extends ServiceProvider
  8. {
  9. const STRIPE = 'billing.stripe';
  10. const STRIPE_KEY = 'services.stripe.key';
  11. protected $defer = true;
  12. /**
  13. * Bootstrap any application services.
  14. *
  15. * @return void
  16. */
  17. public function boot()
  18. {
  19. view()->composer('layouts.sidebar', function ($view) {
  20. $view->with('archives', Post::archives());
  21. });
  22. }
  23. /**
  24. * Register any application services.
  25. *
  26. * @return void
  27. */
  28. public function register()
  29. {
  30. // Use app->singleton(Stripe::class) instead to obtain a reused instance.
  31. // Use app->instance(Stripe::class, $stripe) to replace the instance with another object.
  32. $app2 = $this->app;
  33. $this->app->bind(Stripe::class, function (Application $app) use($app2) {
  34. // Yes, there are 3 ways to get to the app in a service closure.
  35. return new Stripe($this->app['config'][static::STRIPE_KEY]);
  36. });
  37. $this->app->alias(Stripe::class, static::STRIPE);
  38. }
  39. }
PANIC: session(release): write data/sessions/5/0/506673d79505c191: no space left on device

PANIC

session(release): write data/sessions/5/0/506673d79505c191: no space left on device
/my/cache/.heroku/go/go-path/pkg/mod/github.com/go-macaron/session@v1.0.3/session.go:204 (0xb13e07)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/context.go:80 (0x967b75)
/my/cache/.heroku/go/go-path/pkg/mod/github.com/go-macaron/inject@v0.0.0-20200308113650-138e5925c53b/inject.go:157 (0x9512ee)
/my/cache/.heroku/go/go-path/pkg/mod/github.com/go-macaron/inject@v0.0.0-20200308113650-138e5925c53b/inject.go:135 (0x951205)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/context.go:124 (0x967cc4)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/context.go:114 (0x967bf6)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/recovery.go:161 (0x15baec4)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/logger.go:40 (0x96b257)
/my/cache/.heroku/go/go-path/pkg/mod/github.com/go-macaron/inject@v0.0.0-20200308113650-138e5925c53b/inject.go:157 (0x9512ee)
/my/cache/.heroku/go/go-path/pkg/mod/github.com/go-macaron/inject@v0.0.0-20200308113650-138e5925c53b/inject.go:135 (0x951205)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/context.go:124 (0x967cc4)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/router.go:187 (0x972959)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/router.go:304 (0x973a01)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/macaron.go:218 (0x96c572)
/my/cache/.heroku/go/go1.26.3/go/src/net/http/server.go:3311 (0x85a5cd)
/my/cache/.heroku/go/go1.26.3/go/src/net/http/server.go:2073 (0x837f6f)
/my/cache/.heroku/go/go1.26.3/go/src/runtime/asm_amd64.s:1771 (0x493380)