# |
Jul 17th 2018, 08:31 |
josbeir |
ever. |
# |
Jul 17th 2018, 08:31 |
josbeir |
@mr.mjsm never put that stuff in your view |
# |
Jul 17th 2018, 08:31 |
madbbb |
thank you for your answers. I will try to use manually unpkg until I have only 3-5 dependencies |
# |
Jul 17th 2018, 08:31 |
slackebot |
variable name used in Email/index.ctp |
# |
Jul 17th 2018, 08:31 |
mr.mjsm |
Question: in the companies template i want to list all the emails associated with a company. so in the view.ctp file I added this code to get a list of the objects: $query = $emails->find('all', ['conditions' => ['Emails.company_id >' => $company->company_id]]); the way i use the condition maybe wrong but that's i will solve later, right now i am getting an error " Undefined variable: emails " how to access the emails then ? i used the same |
# |
Jul 17th 2018, 08:26 |
josbeir |
indeed, i like webpack and then put that stuff on a cdn if needed |
# |
Jul 17th 2018, 08:25 |
admad |
if you have only we assets then directly using unkpg is fine |
# |
Jul 17th 2018, 08:25 |
neon1024 |
I use Yarn for Vue.js as I need Node.js dependencies, but I wouldn’t use Yarn for jQuery |
# |
Jul 17th 2018, 08:25 |
neon1024 |
I like unpkg as I can fix a semver |
# |
Jul 17th 2018, 08:25 |
josbeir |
so npm is the way to go in my opinion |
# |
Jul 17th 2018, 08:25 |
josbeir |
lock files, multi threading |
# |
Jul 17th 2018, 08:25 |
neon1024 |
I prefer to use a CDN like unpkg or jsdelivr |
# |
Jul 17th 2018, 08:25 |
josbeir |
yarn too in that matter, that is, npm now has most of the functionality yarn solved |
# |
Jul 17th 2018, 08:24 |
admad |
avoid bower, it's defunct |
# |
Jul 17th 2018, 08:24 |
admad |
@bogdan cake does not impose any opinions regarding frontend libs. You can use npm/yarm to fetch them and then generated compressed version in webroot/js |
# |
Jul 17th 2018, 08:21 |
madbbb |
What is the best practice to manage all frontend libraries in cakephp? Do you use npm or bower to download all these jquery, select2 js libraries? I'm a little bit frustrated where to start. I don't want to download all these libraries and put them in webroot/js by myself. May be you have some repository with example? |
# |
Jul 17th 2018, 08:16 |
madbbb |
morning! |
# |
Jul 17th 2018, 07:16 |
DBZSadie |
Sorry I'm not on slack so can't see your image. But you should go through the tutorial here which explains how to do what you want: https://book.cakephp.org/3.0/en/tutorials-and-examples/cms/database.html |
# |
Jul 17th 2018, 07:16 |
chris-andre |
@mr.mjsm Plural company is companies, to stick with cakephp convensions. If you run `bin/cake bake all companies` command, you will have table, model, controller classes and view template file generated, which will give you something to start with. |
# |
Jul 17th 2018, 07:10 |
mr.mjsm |
File uploaded https://cakesf.slack.com/files/UBN7KUDRA/FBR5WCMS5/pasted_image_at_2018_07_17_10_09_am.png / https://slack-files.com/T053DPNCM-FBR5WCMS5-1030bbf966 - so what I want is, when I press view in the company's page i want to see the company description along with all emailsandamp;contacts associated with it |
# |
Jul 17th 2018, 06:17 |
DBZSadie |
assuming your two tables are set up correctly, you can contain the data from table 2 with your find on table 1. See https://book.cakephp.org/3.0/en/orm/retrieving-data-and-resultsets.html#eager-loading-associations-via-contain |
# |
Jul 17th 2018, 05:54 |
mr.mjsm |
morning everyone, so i am new to cakephp. i implemented some data tables and cakePHP auto generate the controller with actions and pages. Now I want to create a page that displays content from 2 tables. what is the best way to achieve this ? |
# |
Jul 17th 2018, 03:59 |
DBZSadie |
Still stuck on mailer failing after upgrading... details here: https://stackoverflow.com/questions/51356463/cakephp-email-not-working-after-upgrade-3-5-2-3-6-7 |
# |
Jul 17th 2018, 03:58 |
DBZSadie |
Hello! |
# |
Jul 16th 2018, 23:16 |
rightscoreanalysis |
is it possible to order the results of a query by sumOf of a column? |
# |
Jul 16th 2018, 22:13 |
ricksaccous |
more helpers are loaded on this one plugin than it suggests |
# |
Jul 16th 2018, 22:12 |
ricksaccous |
yeah either it's mistaken or i am |
# |
Jul 16th 2018, 22:06 |
sdevore |
@ricksaccous |
# |
Jul 16th 2018, 21:34 |
ricksaccous |
nevermind that doesn't work |
# |
Jul 16th 2018, 21:03 |
ricksaccous |
heh |
# |
Jul 16th 2018, 21:03 |
ricksaccous |
it seems you could kind of see if you debug $this->viewBuilder |
# |
Jul 16th 2018, 21:00 |
dereuromark |
you might not know since those should be loaded by the view layer |
# |
Jul 16th 2018, 20:57 |
ricksaccous |
that are loaded i mean |
# |
Jul 16th 2018, 20:56 |
ricksaccous |
in a controller |
# |
Jul 16th 2018, 20:56 |
ricksaccous |
what's the best way to get a list of all helpers |
# |
Jul 16th 2018, 19:31 |
Guest90285 |
I am using user plugin and acl plugin for authentication and authorization. |
# |
Jul 16th 2018, 19:30 |
Guest90285 |
I am facing a simple problem in cakephp 3, version: 3.6.7 |
# |
Jul 16th 2018, 19:29 |
Guest90285 |
hello! |
# |
Jul 16th 2018, 18:53 |
kitcat711 |
lol, not that much, but this is everywhere |
# |
Jul 16th 2018, 18:52 |
chikore |
kitcat711, you are so excited :) |
# |
Jul 16th 2018, 18:40 |
kitcat711 |
we are the champions "deux étoiles" my frieend! |