Questions tagged as 'php'

1
answer

How to build a reusable bundle in symfony and manageable via composer

Even after reading best practices for code reuse in symfony and search for the use of < a href="https://tableless.com.br/composer-para-iniciantes/"> composer , I still can not understand how in practice I should create my bundle to be reusable...
asked by 18.12.2016 / 21:13
1
answer

Angular ui router plus PHP

Currently I have an array in php that converts to JSON using json_encode json and generated without problems. $array = array('a' => 'Olá mundo', 'b' => 'Olá Marte'); $array = json_encode(array); //$array agora retorna {"a":"Olá mu...
asked by 15.02.2017 / 13:44
1
answer

Send more than one JSON file in a single AJAX request

I am requesting two JSON files for the getJSON function from JQuery. I'm trying to send them via AJAX but I can not. I've done the following: var data = '[{"agents": '+agents +', "projects":' + projects + ', "spaces": ' +spaces+', "events":' +...
asked by 19.12.2016 / 14:42
2
answers

Problems with number_format (PHP) by colon in numeral

I'm having problems with the number_format function of PHP, since my numeral comes from the database with two points, eg:    1.235.32 I'm using number_format this way: number_format(floatval('1.235.32'), 2, ',', '.'); A...
asked by 21.12.2016 / 19:53
1
answer

Display on select bank attributes and edit with Laravel

I was able to include the attributes through an auxiliary table by this question: Save multiple attributes to the same object in Laravel I would now need what was set in this helper table to be selected in the edit form Controller:...
asked by 18.12.2016 / 16:12
1
answer

Optimizing default middleware behavior

I have the following middleware: class OwnerOrAdmin { public function handle($request, Closure $next) { $user = \Auth::user(); $postId = $request->route('post'); $post = $user->posts->find($postId);...
asked by 19.12.2016 / 18:29
1
answer

How to do a text search and the Select tag together?

I'm here because I'm having trouble doing a search like any other with <input text> and "search" button only with the tag <select> where it contains in each <option> a value of the search. The questi...
asked by 01.11.2016 / 16:42
1
answer

Call PHP function at the click of a button

Good! I'm trying to call a PHP function at the click of a button. My solution so far: <?php $result = getResult($mysqli,"SELECT * from todos WHERE sender = '$username' AND status = '$value' AND journal = '$journal' ORDER BY expiration_d...
asked by 03.11.2016 / 13:48
2
answers

Ajax with multidimensional JSON type return

Save, I buggy here trying to get ajax to fetch data from a JSON and I need a class / help to understand how I pull the values from an array of objects (I think that's it). I have the following code, it's kind of confusing, but my goal is to do t...
asked by 02.11.2016 / 05:10
1
answer

How to update the PHP version in Laravel?

I tried to install a dependency and it asked for a larger version of PHP. Problem 1    illuminate / support v5.3.4 requires php > = 5.6.4 - > your PHP version (5.5.9) does not satisfy that requirement.    illuminate / support v5.3.1...
asked by 06.10.2016 / 16:22