# |
Jul 17th 2018, 08:36 |
josbeir |
don't let this talk frighten you tho, i'm sure you will get stuff up and runing in a while :slightly_smiling_face: |
# |
Jul 17th 2018, 08:35 |
admad |
the manual is available is multiple languages, so if translation is available in your native language use that |
# |
Jul 17th 2018, 08:35 |
josbeir |
it will shed a light on most of the things you need to know before you start |
# |
Jul 17th 2018, 08:35 |
josbeir |
maybe first read up on the basics on MVC patterns in development |
# |
Jul 17th 2018, 08:35 |
admad |
you English seems decent enough, don't see why you cannot follow the tutorials :slightly_smiling_face: |
# |
Jul 17th 2018, 08:35 |
mr.mjsm |
ok will do it, hope my answer is there :+1: |
# |
Jul 17th 2018, 08:34 |
admad |
being new to a framework is exactly why you should be doing tutorials first |
# |
Jul 17th 2018, 08:33 |
mr.mjsm |
:,( sorry new to cakephp. i tried to read the tutorial but didn't understand that much. so I just went on coding |
# |
Jul 17th 2018, 08:33 |
admad |
have you done the CMS tutorial from the manual? |
# |
Jul 17th 2018, 08:32 |
admad |
@mr.mjsm "so in the view.ctp file I added this code" NEVER do database calls in view layer |
# |
Jul 17th 2018, 08:32 |
neon1024 |
@mr.mjsm Have you completed the Tutorial? |
# |
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 |