| 1 | <?php |
||
| 7 | class PushSubscription extends Model |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * The attributes that are mass assignable. |
||
| 11 | * |
||
| 12 | * @var array |
||
| 13 | */ |
||
| 14 | protected $fillable = [ |
||
| 15 | 'endpoint', |
||
| 16 | 'public_key', |
||
| 17 | 'auth_token', |
||
| 18 | 'content_encoding', |
||
| 19 | ]; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Create a new model instance. |
||
| 23 | * |
||
| 24 | * @param array $attributes |
||
| 25 | * @return void |
||
|
|
|||
| 26 | */ |
||
| 27 | 1 | public function __construct(array $attributes = []) |
|
| 39 | |||
| 40 | 9 | /** |
|
| 41 | * Get the model related to the subscription. |
||
| 42 | * |
||
| 43 | * @return \Illuminate\Database\Eloquent\Relations\MorphTo |
||
| 44 | */ |
||
| 45 | public function subscribable() |
||
| 49 | |||
| 50 | /** |
||
| 51 | * Find a subscription by the given endpint. |
||
| 52 | * |
||
| 53 | * @param string $endpoint |
||
| 54 | * @return static|null |
||
| 55 | */ |
||
| 56 | public static function findByEndpoint($endpoint) |
||
| 60 | } |
||
| 61 |
Adding a
@returnannotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.