Posts by tiagopaes • 99 points
12 posts
-
1
votes2
answers38
viewsA: Expose an object ( based on request ) for every application
guess q in this case the best solution is to put this method in the file Controller.php and then all other controllers in your application that extend this class can use this method normally.…
-
0
votes1
answer140
viewsA: UPDATE AJAX + LARAVEL
you need to put the ajax.php code in your controller, but instead of echo you can just return the variable $jSON. By default the Standard will convert your reply to json.
-
0
votes1
answer33
viewsA: Error making the list
Add the with method in your query to bring the subunits. Example : $civis = civil::orderBy('id','ASC')->with('sub_unidade')->paginate(200);
-
0
votes1
answer49
views -
1
votes1
answer1058
viewsA: Problem with PHP+Apache XAMPP redirection
This problem occurs because the function echo changes the response header and then you can no longer use the function header(). In this the ideal would be not to use the function echo to be able to…
-
0
votes2
answers2962
viewsA: How to total fields in Lade using Laravel?
To solve this problem you can put the return of your query in a variable and pass to the view the total of items of this variable. would look something like: Controller $dados = DB::select('sua…
-
0
votes1
answer227
viewsA: How to use an . php extension file in an Laravel form?
The ideal would be to use the routes of the Laravel to do this, otherwise it would not make sense to use a framework that provides you several resources if you do not want to use these resources.…
-
0
votes1
answer76
viewsA: Pass id to call modal
You can put the first array into a separate variable and then concatenate the string in this way: $primeiroArray = array( 'db' => 'id', 'dt' => 0); $columns = array( $primeiroArray, array(…
-
0
votes3
answers210
viewsA: How to format an HTML element p/ become equal to a button?
If you prefer, you can simply add the class button in the direct element in html.
-
2
votes1
answer2964
viewsQ: Does Poser autoload not work?
I’m trying to use the autoload of composer and I can’t, he says the class not found and trying to load a class from an external library. I’ve already executed on the command line: composer install…
-
2
votes1
answer369
viewsQ: "mysqli_connect" does not work
I am unable to use the "mysqli_connect" function. Can anyone help me? You are returning the following error: Fatal error: Constant Expression contains invalid Operations in…
-
0
votes2
answers592
viewsA: Virtual hosts configuration in Vagrant Homestead/Laravel
Man, you need to give command vagrant init inside your project folder. Done this a file called vagrantfile will be generated. You need to open this file and set the Homestead box in it. I believe…