Learn and Understand Yii2: Video 3
First Steps

Leave a Comment

jasonorion (Friday 27th of July 2018 at 08:27:03 PM, GMT)
initial validation for 'validateTitle' worked great, when I added 'params' it broke, I think my code is the same can anyone see what I am missing. I can enter all the fields (Jimi last) and no errors and save button does not work anylonger :

public function rules()
return [
[['book_title', 'author', 'amazon_url', 'review'], 'required'],
[['review'], 'string'],
[['book_title', 'author', 'amazon_url'], 'string', 'max' => 255],
['book_title', 'validateTitle', 'params' =>['author' => 'author', 'amazon_url' => 'amazon_url', 'review' => 'review']],

public function validateTitle($attribute, $params)
$book_title= $this->$attribute;
$author = $this->$params['author'];
$amazon_url = $this->$params['amazon_url'];
$review = $this->$params['review'];
if(($book_title == 'Jimi') && ($author == 'Hendrix') && ($amazon_url=='guitat') &&
$this->addError($attribute, "You are not allowed to say Jimi Hendrix guitar player");

Ignatius (Friday 1st of June 2018 at 08:38:16 AM, GMT)
Hi David. I like the way you teach. Could you please help us and make videos on yii2 advanced template

Warwick (Monday 9th of April 2018 at 04:47:32 AM, GMT)
The rules for the soft G and the hard G is:
If the G is followed directly by an I or an E then the G is soft (pronounced like a J).
If the G is not followed directly by an I or an E then it's pronounced like an ordinary G.
The same rule applied for soft C (an S sound) and a hard C (a K sound).
So what I'm saying is that Gii should be pronounced Jee. Except for Git so not as to confuse it with Java's Jit.

Warwick (Tuesday 3rd of April 2018 at 07:35:10 AM, GMT)
Again Great Presentation.

Warwick (Monday 2nd of April 2018 at 11:24:59 PM, GMT)
Great informative video as is all of your tuts. I'll recommend you to my nerdy buddies. I think it would be good to have a mention of page validation. Most devs don't validate their pages any more. After all validation guarantees that you pages will never break in HTML5 compliant browsers. I've seen a happen a few times when a major browser gets an update which breaks previously unbroken code. I've noticed you have a Scottish accent. If you're ever in London you should look me up.

ruixing (Thursday 11th of January 2018 at 01:02:49 PM, GMT)
where is the code?

kdotbransen (Sunday 10th of December 2017 at 05:26:16 PM, GMT)
Hi David and All,

When embarking on the last step in this video ('pretty urls'), I get the XAMPP Welcome Page (dashboard) - along with "/dashboard/" continuing to attach itself to my "yiisite" url

So, when I type in:

I get:
The same site as typing in:

Would u please advise?

And/or, should this be posted - newly - in the Forum?

Thank you!!!

sunilroy (Wednesday 22nd of November 2017 at 01:50:54 PM, GMT)
David, your videos are amazing. I have never seen such a minute and detailed coverage of topics.

The tricks shown by you are amazing.

damba17 (Thursday 26th of October 2017 at 01:05:33 PM, GMT)
David, never give up! No one else compares to you.
And, by the way, more waffles!

Best Regards

josephkarout (Friday 20th of October 2017 at 11:12:56 AM, GMT)
thanks, great tutorial.
you are my hero :)

Sonofgun (Tuesday 17th of October 2017 at 08:27:49 AM, GMT)
DC sir ...you rock......

ConAct (Tuesday 19th of September 2017 at 02:05:52 PM, GMT)
Great video David!

Just a little hint, which took me a while to figure it out:

You may have to uncomment the "include etc/extra/httpd-vhosts.conf" line in the httpd.conf file (found in the etc-folder)

acspite (Friday 8th of September 2017 at 06:28:51 PM, GMT)
Cool. Nice. Thank You, David!

mim (Tuesday 18th of July 2017 at 03:24:45 PM, GMT)
Hi David, very nice tutorial, keep it that way!

javedsai (Sunday 11th of June 2017 at 09:57:08 AM, GMT)
After configuring i am not able to handle other projects inside htdocs with localhost/otherprojects and redirecting me to yiisite 404 error. So how to run other projects which is normally done in "corephp" and "codeigniter". Please note, I don't want to use virtual host for those "CI" Projects. Rest every this is fine.

Waiting for your reply.

Mark in the USA (Tuesday 9th of May 2017 at 07:36:54 PM, GMT)
Nice series of videos. I haven't worked with Yii since the original, so this is a good refresher and bring me up to date training.

One question, I noticed when you do comments, you do something like:

"// this is an example of a comment by DC"

I'm used to doing this:
"// This is an example of a comment by DC."

Is there a standard? My Lead Architect is very exacting about how comments are written in code.

coxnatist (Wednesday 19th of April 2017 at 01:09:09 PM, GMT)
Hello Mentor, I started watching your series on Yii2 framework and I can't thank you enough. I really appreciate the great work you have done.

You promised a next video since last year and you didn't post any video anymore.
I guess you are very busy but please when ever you are chance please remember you humble students. We are waiting patiently for you.

Thanks for effecting my life positively.

Thank you!

Pixels (Thursday 1st of September 2016 at 07:50:34 AM, GMT)
Hey David, thanks for these videos. They really helped me with getting started with Yii2. I'm just wondering if this series is now dead though?

Thanks again,

mexlataster (Wednesday 31st of August 2016 at 08:44:24 AM, GMT)
thx man you are the best,

Brnovich (Monday 29th of August 2016 at 06:49:48 AM, GMT)
Hey David .. pretty cool stuff and it's fun watching your videos. Question though. With validation for date, how do I get the field to be a datepicker instead of a textfield?

keops232000 (Sunday 7th of August 2016 at 11:24:47 AM, GMT)
More Waffles..::)

Unknown (Sunday 7th of August 2016 at 11:23:31 AM, GMT)
More Waffles...is all that matters!!..without them is just text for a beginner to understand:)

Nice tutorials..!!!

Unknown (Saturday 9th of July 2016 at 11:40:51 AM, GMT)
thanks for the wrap bootstrap tip

fullrespect (Thursday 2nd of June 2016 at 10:41:42 PM, GMT)
I found first issue... I accidentally clicked twice on a post comment it there you go you have to do something about posting comments script. Maybe some delay set in case of spammers ? OK, i am going now... watch another episode of your tutorial :)

fullrespect (Thursday 2nd of June 2016 at 10:39:18 PM, GMT)
BTW, forgot to add... Is this website on Yii2 engine ? It is so fast !!!

fullrespect (Thursday 2nd of June 2016 at 10:37:43 PM, GMT)
Brilliant stuff David, I am with you since you started your first video about CodeIgniter ! And I just love your Scottish accent and the way you present all the tutorials. Flow i just about right, thanks ! I have learnt a lot thanks to you ! Keep doing fantastic job !

fullrespect (Thursday 2nd of June 2016 at 10:37:43 PM, GMT)
Brilliant stuff David, I am with you since you started your first video about CodeIgniter ! And I just love your Scottish accent and the way you present all the tutorials. Flow i just about right, thanks ! I have learnt a lot thanks to you ! Keep doing fantastic job !

Guiltyvictim (Sunday 29th of May 2016 at 08:33:45 AM, GMT)
Can you make the video mobile / tablet friendly please? Can't full screen on the site atm on iPad :(

Dan (Tuesday 24th of May 2016 at 07:24:59 PM, GMT)
I hate how spell check changes yii2 to yin.

Dan (Tuesday 24th of May 2016 at 07:23:57 PM, GMT)
I like they way you are presenting Yii2. It is very enjoyable and helpful in understanding how yin files work. Thanks

Davcon (Tuesday 17th of May 2016 at 11:05:48 AM, GMT)
Thanks for the positive vibes.

Johnny, here's the URL that goes straight to the bit with db configuration: https://youtu.be/KIgL4WAKFl8?t=7m12s

Darren (Monday 16th of May 2016 at 08:02:11 PM, GMT)
Fantastic video, David. The pace is just right. Keep going exactly as you've been doing, it's perfect.

johnnydriesen (Monday 16th of May 2016 at 06:35:39 PM, GMT)
Hi David,

Small question..
Around 2:10, you're creating the model, usign the Model Creator ...
How does GII knows which database you want to use ?

(I guess I missed that , somewhere, somehow ... sorry about that...)

Thanks for replying !


paeon (Sunday 15th of May 2016 at 03:24:43 PM, GMT)
Excellent tutorials, keep up the great work David, we really appreciate it.
Thank you.

Davcon (Saturday 14th of May 2016 at 05:50:13 PM, GMT)
Thanks for the positive feedback, folks. Without it, I would not bother with any of this. Thank you!

theo (Saturday 14th of May 2016 at 05:15:22 PM, GMT)
Excellent. Looking forward for more.

theo (Saturday 14th of May 2016 at 01:59:56 PM, GMT)
Thank you for the tutorial. I enjoyed as much as the rest.

Code4fun (Thursday 12th of May 2016 at 10:25:02 AM, GMT)
Good stuff, David. Well done!

EdBlack (Thursday 12th of May 2016 at 01:45:16 AM, GMT)
I like to hear you waffle. You have great tutorials. Easy to follow and entertaining at the same time.

saidbakr (Wednesday 11th of May 2016 at 06:59:04 PM, GMT)
Wow! You are great man, you are starting to demonstrate Model deeply from its origin. It is the first time that I have seen MVC explained in such smooth and logical way.

Selirah (Wednesday 11th of May 2016 at 05:39:39 PM, GMT)
Thumbs Up to you David

johnnydriesen (Tuesday 10th of May 2016 at 07:06:36 PM, GMT)
"Keep going, by the way" ...
"Keep Going ... You're doing FANTASTIC, David !!!"

jjohnsonjr48 (Monday 9th of May 2016 at 10:10:35 PM, GMT)
I like the "waffle-ing".

© Copyright 2013 - 2018 David Connelly | www.davidconnelly.com | www.dcradionetwork.com