Log message #4208761

# At Username Text
# Oct 14th 2019, 17:27 david but MyPlugin shell commands are not autodiscovered when I run ./cake
# Oct 14th 2019, 17:27 david yes, I loaded the plugin via ./cake plugin load MyPlugin, so Application.php has been updated with $this->addPlugin('MyPlugin');
# Oct 14th 2019, 17:24 dereuromark If you loaded/enabled the plugin.
# Oct 14th 2019, 17:20 david When a plugin has a shell, the shell commands should be showed in console when you run ./cake, isn't it?
# Oct 14th 2019, 16:25 jotpe Thanks :slightly_smiling_face:
# Oct 14th 2019, 16:25 jotpe Alright, I changed this.
# Oct 14th 2019, 16:22 admad that looks fine but unlike `getPath()` `getRequestTarget()` will include query string
# Oct 14th 2019, 16:17 jotpe I don't need to inject other classes so this should be fine, or?
# Oct 14th 2019, 16:17 slackebot1 <jotpe>
# Oct 14th 2019, 16:17 jotpe @admad Yes, i used this. I ended up building a helper with something like this:
# Oct 14th 2019, 16:05 admad @jotpe `$this->request->getPath()` will return the current URL without query string args if any
# Oct 14th 2019, 15:58 jotpe Thanks @tobse, @dereuromark and @admad
# Oct 14th 2019, 15:52 admad a more generic solution would be generate URL for record and compare with current request's URL. Then you will be able to use the check for any record, not just companies
# Oct 14th 2019, 15:50 dereuromark wrapping it inside helpers maybe :slightly_smiling_face:
# Oct 14th 2019, 15:46 tobse I'm using the request object in my menu-elements. I.e. ''' if ($this->request->getParam('controller') === 'Companies' andand $this->request->getParam('pass')[0] === strtolower($company->slug)) { $active = ' active'; $current = ' <span class="sr-only">' . __x('Navigation', '(current)') . '</span>'; }''' Maybe there is a much more elegant way. :slightly_smiling_face:
# Oct 14th 2019, 15:40 jotpe What's the proper way to get the current request url within a view? E.g. for set the current active link in a menu in a element?
# Oct 14th 2019, 15:12 ricksaccous that's cool man, hopefully you can maintain it easily enough
# Oct 14th 2019, 15:12 ricksaccous lol jk
# Oct 14th 2019, 15:12 ricksaccous HERETIC LEAVE THIS CHANNEL AT ONCE
# Oct 14th 2019, 15:11 nils I moved to Laravel a while back. That’s my new god. I only have one project to maintain in Cakephp :slightly_smiling_face:
# Oct 14th 2019, 15:10 ricksaccous BELIEVE MY FRIEND AND YOU WILL ACHIEVE
# Oct 14th 2019, 15:09 nils :)
# Oct 14th 2019, 15:09 ricksaccous you gotta believe
# Oct 14th 2019, 15:08 nils Not attitude problems, age problems. I started out too late. :slightly_smiling_face:
# Oct 14th 2019, 15:07 ricksaccous not with that attitude
# Oct 14th 2019, 15:06 nils Haha, I will never become victorious in the developer-scene.
# Oct 14th 2019, 15:06 ricksaccous no pain no gain
# Oct 14th 2019, 15:06 ricksaccous this is why we're here oh yeahhhhh
# Oct 14th 2019, 15:06 ricksaccous @nils you're being molded by the flames into a better developer, through the flames you will rise victorious
# Oct 14th 2019, 15:05 nils Yeah. A lot of the burns were simply language barriers. I mean, it’s nice to have english, PHP and CakePHP as a native language. Some people here were never beginners it seems. :slightly_smiling_face:
# Oct 14th 2019, 15:05 admad yeah, if you don't have a thick skin :slightly_smiling_face:
# Oct 14th 2019, 15:04 niel45 flame-retardant underwear helps
# Oct 14th 2019, 15:03 nils I guess. When I started hanging out in this channel around 8 years ago I got burned each and every day. So I’m used to it.
# Oct 14th 2019, 15:03 ricksaccous lol
# Oct 14th 2019, 15:02 admad the burn is worth the effort of extra typing
# Oct 14th 2019, 15:02 nils Yeah. Just thought there would be easier for you to type “Yes” rather than “This is not somethi…“ ;)
# Oct 14th 2019, 15:00 ricksaccous ouch another harsh one, sometimes other netizens need tough love though
# Oct 14th 2019, 15:00 neon1024 Maybe search Google for ‘Basic maths’
# Oct 14th 2019, 15:00 neon1024 You have all the power of The Internet at your fingertips
# Oct 14th 2019, 14:59 neon1024 This is not something you need me for.
# Oct 14th 2019, 14:59 neon1024 > 100 pence = 1 pound?