# |
Jun 29th 2018, 19:52 |
chrispecoraro |
``` $this->PaginatorHelper = new PaginatorHelper(); $this->Paginator->settings = ['limit' => 10, 'recursive'=>-1];``` |
# |
Jun 29th 2018, 19:52 |
chrispecoraro |
And then I do this: |
# |
Jun 29th 2018, 19:51 |
chrispecoraro |
``` public function index(){ $this->Paginator->settings = ['limit' => 10, 'recursive'=>-1]; $this->renderView($this->Paginator->paginate('Employer')); } ``` |
# |
Jun 29th 2018, 19:51 |
chrispecoraro |
If I do this: |
# |
Jun 29th 2018, 19:51 |
chrispecoraro |
I'm still having issues implementing the PaginationHelper. |
# |
Jun 29th 2018, 15:36 |
mdunham |
slackebot4: hey |
# |
Jun 29th 2018, 15:35 |
mdunham |
jose |
# |
Jun 29th 2018, 15:30 |
josbeir |
i guess i'll give it a go |
# |
Jun 29th 2018, 15:30 |
josbeir |
i know i know i read up on the basics |
# |
Jun 29th 2018, 15:29 |
admad |
Well then educate yourself :slightly_smiling_face: |
# |
Jun 29th 2018, 15:28 |
josbeir |
:) |
# |
Jun 29th 2018, 15:28 |
josbeir |
always hesistant for production use with plugins i dont know much about |
# |
Jun 29th 2018, 15:27 |
admad |
@josbeir I do :slightly_smiling_face: |
# |
Jun 29th 2018, 15:17 |
itmpls |
'plugin' => 'Companies', 'controller' => 'Companies', 'action' => 'index', 'prefix' => 'subdomain' should this not map to plugins/Companies/src/Controller/CompaniesController.php with namespace Companies\Controller; use Companies\Controller\AppController; class CompaniesController extends AppController { public function index(); } |
# |
Jun 29th 2018, 15:12 |
josbeir |
i'm deciding on using the crud plugin or not, you guys all using it ? |
# |
Jun 29th 2018, 15:01 |
itmpls |
:slightly_smiling_face: |
# |
Jun 29th 2018, 15:01 |
itmpls |
good morning |
# |
Jun 29th 2018, 14:46 |
mdunham |
good morning |
# |
Jun 29th 2018, 14:26 |
jhob |
all sorted now, used a collection - thanks for the help |
# |
Jun 29th 2018, 13:57 |
josbeir |
if you have a route that needs to be reachable from more then 1 host you can also load these in your middleware or something |
# |
Jun 29th 2018, 13:56 |
itmpls |
k |
# |
Jun 29th 2018, 13:56 |
itmpls |
yeah I don't need dynamic routes really |
# |
Jun 29th 2018, 13:55 |
josbeir |
but if you dont need dynamic routes but some hardcoded routes specifically for 1 domain you can use the _host param |
# |
Jun 29th 2018, 13:55 |
josbeir |
'dynamic' routes can be added in your middleware |
# |
Jun 29th 2018, 13:55 |
josbeir |
normal shared routes can be defined in your routes.php file, no need to add _host etc, they will just work on all domains |
# |
Jun 29th 2018, 13:54 |
itmpls |
for example, nebraska.domain.com, miami.domain.com .. same template/theme, just different subdomain |
# |
Jun 29th 2018, 13:54 |
itmpls |
they'll be using the same template/theme, i dont need custom routes for each section |
# |
Jun 29th 2018, 13:54 |
itmpls |
it'll probably just be within 1 plugin |
# |
Jun 29th 2018, 13:53 |
itmpls |
oh and the routes.. haven't configured that yet |
# |
Jun 29th 2018, 13:53 |
itmpls |
there's 1 primary domain but many subdomains |
# |
Jun 29th 2018, 13:53 |
itmpls |
and i'm already validating them in the middleware |
# |
Jun 29th 2018, 13:53 |
josbeir |
and the routes for that domain ? |
# |
Jun 29th 2018, 13:53 |
itmpls |
yeah, the subdomains are stored in a table |
# |
Jun 29th 2018, 13:53 |
josbeir |
you have your domain specific routes stored in a db right? |
# |
Jun 29th 2018, 13:52 |
josbeir |
there are a few ways |
# |
Jun 29th 2018, 13:51 |
josbeir |
check out the routing middleware |
# |
Jun 29th 2018, 13:51 |
itmpls |
you mean not in config/routes? |
# |
Jun 29th 2018, 13:50 |
itmpls |
i'm just not understanding how i'd "load up routes for that site dynamically" though - haven't messed much with custom routes or middleware in cake |
# |
Jun 29th 2018, 13:50 |
josbeir |
:) |
# |
Jun 29th 2018, 13:49 |
lorenzo |
@josbeir brave guy |
# |
Jun 29th 2018, 13:48 |
josbeir |
if you load then from a db its not needed |