| 1 |  |  | <?php | 
            
                                                                                                            
                            
            
                                    
            
            
                | 2 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 3 |  |  | namespace plunner; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 4 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 5 |  |  | use Illuminate\Database\Eloquent\Model; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 6 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 7 |  |  | /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 8 |  |  |  * plunner\Caldav | 
            
                                                                                                            
                            
            
                                    
            
            
                | 9 |  |  |  * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 10 |  |  |  * @property integer $calendar_id | 
            
                                                                                                            
                            
            
                                    
            
            
                | 11 |  |  |  * @property string $url | 
            
                                                                                                            
                            
            
                                    
            
            
                | 12 |  |  |  * @property string $username | 
            
                                                                                                            
                            
            
                                    
            
            
                | 13 |  |  |  * @property string $password | 
            
                                                                                                            
                            
            
                                    
            
            
                | 14 |  |  |  * @property string $calendar_name | 
            
                                                                                                            
                            
            
                                    
            
            
                | 15 |  |  |  * @property \Carbon\Carbon $created_at | 
            
                                                                                                            
                            
            
                                    
            
            
                | 16 |  |  |  * @property \Carbon\Carbon $updated_at | 
            
                                                                                                            
                            
            
                                    
            
            
                | 17 |  |  |  * @property-read Calendar $Calendar | 
            
                                                                                                            
                            
            
                                    
            
            
                | 18 |  |  |  * @method static \Illuminate\Database\Query\Builder|\plunner\Caldav whereCalendarId($value) | 
            
                                                                                                            
                            
            
                                    
            
            
                | 19 |  |  |  * @method static \Illuminate\Database\Query\Builder|\plunner\Caldav whereUrl($value) | 
            
                                                                                                            
                            
            
                                    
            
            
                | 20 |  |  |  * @method static \Illuminate\Database\Query\Builder|\plunner\Caldav whereUsername($value) | 
            
                                                                                                            
                            
            
                                    
            
            
                | 21 |  |  |  * @method static \Illuminate\Database\Query\Builder|\plunner\Caldav wherePassword($value) | 
            
                                                                                                            
                            
            
                                    
            
            
                | 22 |  |  |  * @method static \Illuminate\Database\Query\Builder|\plunner\Caldav whereCalendarName($value) | 
            
                                                                                                            
                            
            
                                    
            
            
                | 23 |  |  |  * @method static \Illuminate\Database\Query\Builder|\plunner\Caldav whereCreatedAt($value) | 
            
                                                                                                            
                            
            
                                    
            
            
                | 24 |  |  |  * @method static \Illuminate\Database\Query\Builder|\plunner\Caldav whereUpdatedAt($value) | 
            
                                                                                                            
                            
            
                                    
            
            
                | 25 |  |  |  */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 26 |  |  | class Caldav extends Model | 
            
                                                                                                            
                            
            
                                    
            
            
                | 27 |  |  | { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 28 |  |  |     //TODO fillable and other fields | 
            
                                                                                                            
                            
            
                                    
            
            
                | 29 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 30 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 31 |  |  |      * @var string | 
            
                                                                                                            
                            
            
                                    
            
            
                | 32 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 33 |  |  |     protected $primaryKey = 'calendar_id'; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 34 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 35 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 36 |  |  |      * @var array | 
            
                                                                                                            
                            
            
                                    
            
            
                | 37 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 38 |  |  |     protected $touches = ['calendar']; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 39 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 40 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 41 |  |  |      * @return \Illuminate\Database\Eloquent\Relations\BelongsTo | 
            
                                                                                                            
                                                                
            
                                    
            
            
                | 42 |  |  |      */ | 
            
                                                                        
                            
            
                                    
            
            
                | 43 |  |  |     public function Calendar() | 
            
                                                                        
                            
            
                                    
            
            
                | 44 |  |  |     { | 
            
                                                                        
                            
            
                                    
            
            
                | 45 |  |  |         return $this->belongsTo(Calendar::class); | 
            
                                                                        
                            
            
                                    
            
            
                | 46 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 47 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 48 |  |  |     //TODO remmeber to don't allow to change timelsot for a caldav claendar | 
            
                                                                                                            
                            
            
                                    
            
            
                | 49 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 50 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 51 |  |  |      * @return \Illuminate\Database\Eloquent\Relations\BelongsTo | 
            
                                                                                                            
                            
            
                                    
            
            
                | 52 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 53 |  |  |     public function Employee() | 
            
                                                                                                            
                            
            
                                    
            
            
                | 54 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 55 |  |  |         $this->calendar->Employee(); | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 56 |  |  |     } | 
            
                                                                                                            
                                                                
            
                                    
            
            
                | 57 |  |  | } | 
            
                                                        
            
                                    
            
            
                | 58 |  |  |  | 
            
                        
An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.
If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.