@@ -60,6 +60,28 @@ Creating a new SSL certificate for a specific domain is easy:
6060\Daanra\LaravelLetsEncrypt\Facades\LetsEncrypt::createNow('mydomain.com');
6161```
6262
63+ Alternative syntax available from v0.3.0:
64+
65+ ``` php
66+ LetsEncrypt::certificate('mydomain.com')
67+ ->chain([
68+ new SomeJob()
69+ ])
70+ ->delay(5)
71+ ->retryAfter(4)
72+ ->setTries(4)
73+ ->setRetryList([1, 5, 10])
74+ ->create(); // or ->renew()
75+ ```
76+
77+ Where you can specify values for all jobs:
78+
79+ - tries (The number of times the job may be attempted)
80+ - retryAfter (The number of seconds to wait before retrying the job)
81+ - retryList (The list of seconds to wait before retrying the job)
82+ - chain (Chain some jobs after the certificate has successfully been obtained)
83+ - delay (Set the desired delay for the job)
84+
6385You could also achieve the same by using an artisan command:
6486``` bash
6587php artisan lets-encrypt:create -d mydomain.com
@@ -84,6 +106,23 @@ $certificate->delete();
84106$certificate->forceDelete();
85107```
86108
109+ ## Failure events
110+
111+ If one of the jobs fails, one of the following events will be dispatched:
112+ ``` php
113+ Daanra\LaravelLetsEncrypt\Events\CleanUpChallengeFailed
114+ Daanra\LaravelLetsEncrypt\Events\ChallengeAuthorizationFailed
115+ Daanra\LaravelLetsEncrypt\Events\RegisterAccountFailed
116+ Daanra\LaravelLetsEncrypt\Events\RequestAuthorizationFailed
117+ Daanra\LaravelLetsEncrypt\Events\RequestCertificateFailed
118+ Daanra\LaravelLetsEncrypt\Events\StoreCertificateFailed
119+ Daanra\LaravelLetsEncrypt\Events\RenewExpiringCertificatesFailed
120+ ```
121+
122+ Every event implements the ` Daanra\LaravelLetsEncrypt\Interfaces\LetsEncryptCertificateFailed ` interface so you can listen for that as well.
123+
124+ ## Automatically renewing certificates
125+
87126Certificates are valid for 90 days. Before those 90 days are over, you will want to renew them. To do so, you
88127could add the following to your ` App\Console\Kernel ` :
89128``` php
0 commit comments