Posts by Patrick Maciel • 2,281 points
65 posts
-
1
votes4
answers264
viewsA: Why does Cakephp set _method to PUT instead of POST?
I still don’t know the logic behind Cakephp to do this, but here’s the thing: If the action is not add(), he considers as PUT, unless the action is delete. So, if it is any custom route, escaping…
-
5
votes4
answers264
viewsQ: Why does Cakephp set _method to PUT instead of POST?
I recently upgraded my Cakephp project to version 2.4.5. Since then, some of my forms have been with the input hidden _method set to PUT automatically. The only way around this is by setting the…
-
7
votes1
answer247
viewsQ: Virtualhost in separate file - Apache compiled
Due there is a lot of VirtualHosts I have, the file on /etc/apche247/conf/extra/httdp-vhost.conf is extensive and disorganized. I know a few ways to create the VirtualHost dynamic, but automatic…
apacheasked Patrick Maciel 2,281 -
1
votes2
answers2962
viewsA: .htaccess with subfolder other than root
Based on the information you’ve given, it’s certainly the version of PHP: Documentation of Laravel 4 The Laravel framework has a few system: PHP >= 5.3.7 Mcrypt PHP Extension Reference - Laravel…
-
4
votes1
answer109
viewsQ: Incorrect form method generated by Cakephp 2.4
My problem occurs with the following code: <?php echo $this->Form->create( 'Page', array( 'url' => array( 'controller' => 'pages', 'action' => 'delete',…
-
2
votes3
answers837
viewsA: Disable Auto Redirect after logging into Cakephp 2.4
Just do this: Just summarizing the code below, what you should do is just add this instruction after logging in: $this->redirect($this->Auth->redirect()); This way login works the ways you…
-
2
votes6
answers1001
viewsA: Error installing Composer in Laravel 4 Project
Just fix your own Composer.json for: { ... ... "require": { "laravel/framework": "4.1.*", ... ... ... "zizaco/confide": "3.1.x", "laravelbook/ardent": "dev-master" } ... ... } I recommend making a…
-
3
votes11
answers8299
viewsA: Should I write my program in English or Portuguese?
By default, good practices, and aiming at a higher maintainability of the code, the most recommended is in English. But it depends on one simple factor: what you’re using to develop? English Whether…
-
6
votes2
answers673
viewsA: How to quickly recover a large PHP array?
In fact it’s completely unfeasible to do that. 128,000 indices in an array, is a large amount to be manipulated and/or compared. The ideal is to keep such information in the database and search it…
-
2
votes2
answers256
viewsA: Problems with Zend layout
Try it like this: // Usar o layout layout_paginas.phtml como padrão Zend_Layout::getMvcInstance()->setLayout('layout_paginas'); Otherwise, use the same way you did, but informing the relative…
-
1
votes3
answers572
viewsQ: Error with complementary routes in Laravel 4
Initially, I created the following route (1st search): Route::get('/buscar/profissoes/{city_id_slug?}', array('as' => 'neighborhoods.city', 'uses' => 'NeighborhoodsController@getIndexCity'));…
-
8
votes3
answers20561
viewsQ: How to create functions in jQuery?
I would like to know the correct way, following good practices, to create functions in jQuery. I’ve used it like this: var focusToEnd = function() { ... } And also so: ; (function($) {…
-
2
votes3
answers2387
viewsQ: User-friendly URL for GET (search) form in Laravel 4
My question is this:: I have a search form (GET), and would like to know how when running Submit send these parameters to the URL in a friendly way. Obs.: parameters are not mandatory. Form: {{…
-
8
votes5
answers1837
viewsQ: How to create a configuration file in Laravel 4?
I would like to know how to create, import and use new configuration files in an Laravel 4 project. By that, I mean, project files and own settings. For example: I would like to create a file that…
-
8
votes2
answers744
viewsA: How to create a Grouped List in Laravel 4 from an entity with self-relationship
Following the development patterns, do so: In his model Item create the following method: /** * getList method * Retorna a lista de itens * * @access public * @return Array * @since 1.0 * @version…