Posts by novic • 35,673 points
1,265 posts
-
1
votes1
answer378
viewsA: C# Help to Load External DLL PNG Sources
The code is a little different from yours, but, this form should be revised, it is very simple when we add the reference in the project, but, I made an example dynamically loading the dll. To…
-
1
votes1
answer168
viewsA: Dynamic Linq Ordering using System.Linq.Dynamic
The OrderBy in your query is generating an ordination of the word code and not from the countryside codigo as it is in your expression Linq Dynamic (OrderBy("@0 ", "codigo")), in SQL below it is…
-
5
votes2
answers382
viewsA: Format value with explode and implode PHP
This date format is ISO8601 = "Y-m-d\TH:i:sO"; so you don’t have to use explode or/and implode, use the datetime class that will solve your problem: $date = DateTime::createFromFormat(…
-
5
votes1
answer2023
viewsA: What’s the point of a Cope on the Laravel?
What is the purpose of these methods where we define the prefix Scope in models? It is intended to facilitate consultation routines in your model (Eloquent), with previous query functionality SQL,…
-
1
votes1
answer523
viewsA: Problem with model Aravel 5.2
How are you using Controller of the kind resource would be so the methods and parameters: <?php namespace App\Http\Controllers; use Illuminate\Http\Request; use App\Http\Requests; class…
-
1
votes1
answer314
viewsA: Move multiple . xml files to another PHP directory
It is a process that can be done with the function, glob and name: <?php // pega a lista de arquivos com a extensão xml. $list = glob(__dir__.'/xml/*.xml'); // diretorio aonde serão remanejados.…
-
1
votes1
answer37
viewsA: How does the controller know it went to it without me passing the parameter in `echo open_form()`?
When you do not put the address for processing the page on the server, the code takes charge and puts the address of the page in the code section below, it is quite clear that: // If no action is…
codeigniteranswered novic 35,673 -
2
votes1
answer1355
viewsA: Validate if person and legal age
Create a function that will determine your validation: function checkIdade(field, rules, i, options){ if (field.val() < 18) { // this allows the use of i18 for the error msgs return…
-
17
votes1
answer4872
viewsA: How to subtract dates in the Laravel?
There is a package installed on Laravel, the Carbon that does several operations with date. As I did not say which operation I really want to do, I put as an example the difference between days of…
-
5
votes1
answer233
viewsA: Define id of the php array()
To get your keys array of the above example use the array_keys to extract the two keys that are the id you need: $array = array( "camposdb" => array( 51 => array( ), 60 => array( ) ) ); $id…
-
5
votes1
answer878
viewsA: Customized authentication with CPF and E-MAIL
The Laravel Framework, has a form of authentication with the instance of class User, it is then possible to check other relevant data for access to the system, following example: $user =…
-
2
votes1
answer603
views -
3
votes1
answer465
viewsA: Laravel 5.2 - validation rule does not work
ZIP CODE can begin with 0, example 01415000, then you can’t have numeric and the size:8 together and will never have eight numbers if you start with 0. So the ideal for validation would be with…
-
2
votes1
answer24
viewsA: Problems writing to an input from the controller
To solve this problem do: <input name="nome" class="form-control" value="{{ isset($p) ? $p->nome : old('nome') }}" /> in case it will work like this, if the object $p has set it will bring…
-
2
votes2
answers840
views