CakePHP 3 Tutorial - part 3: Routing & Views

Поділитися
Вставка
  • Опубліковано 2 лют 2025

КОМЕНТАРІ • 40

  • @QuadraticMnemonic
    @QuadraticMnemonic 7 років тому

    Thanks -- I'm finding these videos to be a great explanatory accompaniment to the standard text tutorial.

  • @ericlouet5354
    @ericlouet5354 7 років тому

    Thanks for those great videos. You make cakephp so simple!

  • @emrahoruc1524
    @emrahoruc1524 9 років тому

    This works for me.
    Router::scope('/bookmarks', function ($routes) {
    $routes->connect('/tagged/*', ['controller' => 'Bookmarks', 'action' => 'tags']);
    });

  • @Mijdax
    @Mijdax 9 років тому

    Dude these videos are amazing :) Good Job

  • @theburn023
    @theburn023 8 років тому +12

    please make the intro music a little less loud..

  • @SauptikBasak
    @SauptikBasak 7 років тому

    I like the color scheme on your PHP storm. Can you tell me the name of it or how to use it ?

  • @Сергей-щ7ш6б
    @Сергей-щ7ш6б 8 років тому

    Hi! What is the difference between using "Scope" method and using directly Router::connect("...") method ?

  • @MohammadArifRahim
    @MohammadArifRahim 7 років тому

    Thanks for the video. I did as you have suggested, but my tagged page does not have any left margin, there is no indentation, it starts from the left most pixel in the page. Can you help please.

  • @Patrick.Sanchez
    @Patrick.Sanchez 3 роки тому +1

    I am wondering why you chose to name the method 'tags' rather then 'tagged'. Would it not make more sense?

  • @sonupancholy5647
    @sonupancholy5647 7 років тому

    Thanks for those great videos

  • @phamthang9189
    @phamthang9189 9 років тому

    thank you so much!!!
    i'm watting more your video
    :)

    • @JBJProgramming
      @JBJProgramming  9 років тому

      +Phạm Thắng Part 4 is live! checkout my channel :)

  • @Lomengrace
    @Lomengrace 8 років тому

    Your tutorial helped me much understanding how CakePHP works. This is a realy great tutorial!
    Is there a "Cake way" to do an AND statement?
    I want to use bookmarks/tagged/cooking/tutorial to get all bookmarks tagged with cooking AND tutorial.

  • @MicroUrb
    @MicroUrb 9 років тому

    where are you getting these links? did you prepopulate these things before? I don't get any sidelinks showing up.

  • @SynPredator
    @SynPredator 9 років тому

    Thank you for this awesome video, Keep it up

  • @suhaimimasri7887
    @suhaimimasri7887 8 років тому

    In the custom bookmarks page find tag, how to handle empty tag (blank)? Otherwise, it will return
    "Impossible to generate condition with empty list of values for field (Tags.title)"
    Thank you.

  • @keliu7373
    @keliu7373 9 років тому

    y in my tags function I have to use $this->loadModel("Bookmarks") before $bookmarks = $this->Bookmarks->find...
    otherwise it will report Error: Call to a member function find() on a non-object . is this because our cakephp version different?

  • @DmitryKCoder
    @DmitryKCoder 9 років тому +1

    Nice tutorial man :)

  • @filipesa1038
    @filipesa1038 9 років тому

    Hey, I'm facing a problem here:
    Whenever I try to run the code I get : Invalid argument supplied for foreach().
    As it seems the query is not fetching anything (even after I did recheck it multiple times )
    Any hints on this?

  • @oladipobolajiadedamola8573
    @oladipobolajiadedamola8573 4 роки тому

    The association is not defined on Bookmarks. there is the error i am getting

  • @krzysztofdraszek643
    @krzysztofdraszek643 9 років тому

    hi which syntax hightlighting theme use u ?
    very good tutorials by the way:)

    • @JBJProgramming
      @JBJProgramming  9 років тому +2

      +Krzysztof Draszek Thanks mate :) I believe i used this theme in the video: www.phpstorm-themes.com/theme/yka

  • @touilanouar7050
    @touilanouar7050 8 років тому

    Error: Create Controller::tags() in file: src\Controller\Controller.php.
    i dont know why !??

  • @AltoSaxPlaya09
    @AltoSaxPlaya09 7 років тому

    When I create a bookmark I can't add any tags. The 'tags' text field will not allow text any suggestions?

    • @Kentama
      @Kentama 7 років тому

      That isn't a text field, it's a selection box. If you create some new tags first, you'll see the tags appear in that box to be selected when you create a bookmark. Figured I should mention even if you figured it out, in case anyone else runs into the problem and sees your comment.

  • @joshuasantiago156
    @joshuasantiago156 9 років тому

    For some reason CakePHP 3 is running really slow on my webserver. I'm using hostgator and when I run a query on CakePHP 3 it is extremely slow in gettings results. What can be the problem?

    • @JBJProgramming
      @JBJProgramming  9 років тому

      +Puse Contact CakePHP has been known to be rather slow, but Version 3 is much faster. Maybe your server host isn't as fast as it should be? I haven't worked with hostgator before so don't know how fast they are.

  • @chriscross2302
    @chriscross2302 6 років тому

    I get an Error: SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #9 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'cakephp.BookmarksTags.tag_id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

    • @davidpirchala927
      @davidpirchala927 6 років тому

      Hey,
      I got the same problem and this helped me(Im using ubuntu 18.04):
      1.open your terminal
      2.type: sudo mysql -u root -p
      3.enter password for your mysql
      4.and type: SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
      Hope it will work
      link : stackoverflow.com/questions/36950857/sqlstate42000-syntax-error-or-access-violation-1055-expression-3-of-select

  • @MicroUrb
    @MicroUrb 9 років тому

    JB you may want to redirect peoples eyes to that part in app.php where it says MySQL on MAMP uses port 8889, MAMP users will want to uncomment the following line and set the port accordingly 'port'=>'8889'. Otherwise people will be frustrated for hours wondering why they cannot connect to the database.

  • @BNH_TV
    @BNH_TV 9 років тому

    Congs. But we also need part 4

    • @JBJProgramming
      @JBJProgramming  9 років тому

      +Ngaboyera Valens I know and i'm working on it :) I will upload it over the weekend, so check back saturday or sunday for it. I think the series will run like 5-6 episodes before the tutorial is done.

    • @BNH_TV
      @BNH_TV 9 років тому

      Good I finish making the installation of my application and cake baking tables and it is fine.

    • @BNH_TV
      @BNH_TV 9 років тому

      I followed this on routing but I failed to understand the end result. I was expecting to see how to built a search form using input text and dropdown options

    • @JBJProgramming
      @JBJProgramming  9 років тому

      +Ngaboyera Valens That would be easy to accomplish once you understand this video. You just build the form using plain old HTML, and then construct the search form to go the URL you defined in the routings. You could also make like a "search" method you go to first in the controller, which then reads the request params and construct an URL.
      For example:
      1. Create a form / dropdown / whatever HTML search form you want
      2. Have it call a method called "findWithFormData" or whatever on the Controller.
      3. Implement the method in the controller - extract the request data, construct the URL to be something like param1/param2 just like we did in the video
      4. Have it redirect to that (just google cakephp 3 redirect)
      Hope it helps.

  • @cormac71
    @cormac71 9 років тому

    I am getting an error: Missing Helper
    cake\view\Exception\MissingExceptionHelper
    think its somthing on this line I think in tags.ctp when looking at errors on page
    $this->$Html->link($bookmark->title, $bookmark->url);

    • @simaspipinis2902
      @simaspipinis2902 9 років тому

      +cormac71 remove '$' from Html
      $this->Html->link($bookmark->title, $bookmark->url);

  • @g3mint446
    @g3mint446 9 років тому +1

    url

  • @miromaric4403
    @miromaric4403 7 років тому

    Please make a new intro

  • @RomanA-p6h
    @RomanA-p6h 6 років тому

    I like the color scheme on your PHP storm. Can you tell me the name of it or how to use it ?