D
D
Daniil Vershinin2019-04-01 12:13:24
OctoberCMS
Daniil Vershinin, 2019-04-01 12:13:24

October CMS error in getAttribute() function?

I'm writing a reverse form plugin. Created a Contact Form component.
ContactForm.php:

<?php namespace Titamik\Contact\Components;

use Cms\Classes\ComponentBase;
use Input;
Use Mail;

class contactform extends ComponentBase { 
    public function componentDetails() {
        return [
            'name' => 'Contact Form',
            'decription' => 'Контактная форма'
        ];
    }

    public function onSend() {
        $vars = ['name' => Input::get('name'), 'email' => Input::get('email')];

        Mail::send('empty', $vars, function($message) {
            $message->to('[email protected]', 'Admin Person');
            $message->subject('This is a reminder');
        });
    }
}

An error pops up:
call to a member function getAttribute() on null on line 447  .../parsedownextra.php

In general, I did everything as in this video: https://www.youtube.com/watch?time_continue=542&v=...
It only works on video, but I don’t (

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
vism, 2019-04-01
@vism

I even opened the video and immediately after 5 seconds I saw the difference in the video and in your code.
Compare by letters if you don't see it that way.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question