Added: 1 year ago
From: andrewperk
Views: 17,900
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (21)

Sign In or Sign Up now to post a comment!
  • What if as a parameter i want to send a slash?? "/". i tried this and give me some error.

  • What is the advantage of using the $Html->link() method over manually writing an anchor tag with a relative link? Calling a class method, and creating an array seems like an unnecessary performance hit.

  • @actionowl If at any point you change your URL's using routing in the future you do not have to go to all of your views and update each link individually. The link helper method will update the link to go to the proper URL location automatically. But if you use a regular <a href link you'll need to go back to each link and update the href if you change a URL.

  • @andrewperk I was hoping there was a good reason :)

    Thanks for putting these videos up!

  • @actionowl Also you should now use the new syntax for calling helpers by using $this before, like so: $this->Html->link() and $this->Form->input().

  • @andrewperk Wish I would have seen that 45 mins ago lol

  • Hey, this helped me a lot in understanding the PHP and CakePHP for a learner like me. I went through online documentation for the find method, it says the return is an array, with two keys 1, Modelname and other for AssociatedModelName, Could anyone tell me what is AssociatedModelName.

  • @0248maheshgupta The associated model name can be any models that your current model is associated with. For instance in this video we are dealing with blog posts. We retrieve the post and store it in a $post variable. We can access that post using $post['Post'], which is the first key. If this post had associated comments you could also access that posts comments through the same $post variable using the associated model name: $post['Comment'].

  • fucking awesome!

  • Yiu make it super easy to understand CakePHP. Thank you so much. I have been reading the official docs for a while... So useless for beginners.

    Maybe what you could explain is how to link to the previous/next posts

  • you videos are awesome , continue :)

  • Hi! I love your videos!! Keep on going!! I am one of your biggest fans!

    Can you tell me what syntax highlight you use?

    I mean, did you setup your ctp files to get parsed as html files within phpstorm?

  • Warning (2): htmlentities() [function.htmlentities]: charset `1' not supported, assuming iso-8859-1 [CORE\cake\libs\view\helpers\h­tml.php, line 294]

    Fatal error: Cannot unset string offsets in C:\xampp\cakephp\cake\libs\vie­w\helpers\html.php on line 299

  • Warning (2): htmlentities() [function.htmlentities]: charset `1' not supported, assuming iso-8859-1 [CORE\cake\libs\view\helpers\h­tml.php, line 294]

    Fatal error: Cannot unset string offsets in C:\xampp\cakephp\cake\libs\vie­w\helpers\html.php on line 299

  • thanks mate!

    your tutorials are awesome!!!

  • The created and modified date for me doesn't work, it just show a bunch of zeros.

  • u r 2uu gud

  • A little question: Why don't you close your php tags in some of your examples?

    Thanks. I love your videos.

  • @BettyBoop186 When you create a php file you don't have to close the php tag, it is not required by php. That's why my controllers and models don't have closing php tags, this actually helps prevent some errors that can pop up such as whitespace after the class. On files that you are outputting something afterward like html, you must close the php tag, we always do this inside of our views.

  • @andrewperk Thanks a lot for your explanation. It has sense.

    Thanks again.

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more