Posts by Artur • 448 points
16 posts
-
0
votes1
answer63
viewsA: Cakephp routine is legend to display data in the view
Does this model have relationships with other models? If so, put recursive = -1, like this: function index(){ $processos = $this->Processo->find('all', array( 'conditions' =>…
-
1
votes1
answer136
viewsA: Change Admin access URL
In your Project/config/Routes.php file ... Router::scope('/', function ($routes) { ... $routes->connect('/admin0978', ['plugin' => null, 'controller' => 'admin', 'action' => 'index']);…
-
1
votes1
answer109
views -
0
votes1
answer97
viewsA: redirect to the view
Mount the url as follows and replace with: $url = Router::url([ 'plugin' => 'seu plugin ou null', 'controller' => 'seu controller', 'action' => 'sua action', '_full' => true // essa é…
-
0
votes1
answer143
viewsA: I cannot validate form in Cake PHP 3
In your View, place this validation at the beginning of the code. This variable will come from the controller when the login is invalid and the validation will fill the fields with the $user…
-
1
votes1
answer30
viewsA: Daily cakephp 2x routine
The ideal is to do in Shell to not consume apache/ngnix resource and run it as linux cron. http://book.cakephp.org/2.0/en/console-and-shells.html I have a habit of doing it this way above.…
-
1
votes1
answer137
viewsA: Insert into a different model table in Cakephp 2.x
Hello! Try something like this, in the product controller, enter the attribute: public $uses = array( 'Estatisticas', ... ); In your product detail action, do the following: // array com os dados…
-
1
votes1
answer122
viewsA: How to keep a controller item in static part of the page?
You should make your query in the bank in Appcontroller, more or less like this: public function beforeRender() { // sua query $query = array( 'order' => array( ... ), 'conditions' => array(…
-
1
votes1
answer541
viewsA: Cakephp relationship HABTM
I’ve got two dirty ones for you, see which one answers and use it, sure if it works. Suppose your relationship in Model PROJECTS is like this: public $hasAndBelongsToMany = array( 'Pessoas' =>…
-
4
votes1
answer11438
viewsQ: User root mysql without permission
I’m having a problem changing permissions of users in mysql with the root user in Debian. I can access normally through the terminal: $ mysql -u root -p So he asks me for the root password, I put…
-
0
votes1
answer69
viewsA: Cakephp is ignoring my model
Your model is inside the plugin? If you have try to use in the controller: public $uses = array( 'Admin.User', ); If not in the plugin use: public $uses = array( 'User', ); Make these calls before…
-
12
votes2
answers45591
viewsA: How to change the www (Documentroot) folder to another partition in Apache 2.4 (Ubuntu 14.04)?
You need to change two apache configuration files: File 1: sudo vim /etc/apache2/apache2.conf Change line: <Directory /var/www/> To Stay like this: <Directory…
-
-2
votes1
answer716
viewsQ: Apache does not read subfolders or other files
Recently, I formatted my computer and installed Ubuntu 14.04 and as always, I changed the apache root Document to: /home/user/Workspace/web. Inside this folder I cloned a project of mine made in…
-
0
votes1
answer263
viewsQ: Configure Cake Bake for Cake Version 2.x
I have a Cake 2.3 Library on my Ubuntu 13.10 configured and running normally. When I try to use cake Bake, it automatically takes over Cake 1.3 Welcome to CakePHP v1.3.14 Console Question: How do I…
-
1
votes2
answers1222
viewsQ: How to pass the application context to the Adapter by reading Json using Asynctask?
private class GetEmpresas extends AsyncTask<Void, Void, Void> { ... @Override protected Void doInBackground(Void... arg0) { // Creating service handler class instance ServiceHandler sh = new…
-
7
votes2
answers4331
viewsQ: How to release a protected sub-directory with . htaccess?
I have a .htaccess in my test environment developed in Cakephp and . htaccess has authentication so that no one can access it. Now I need to release a site directory, actually a Cakephp plugin, I…