Posts by Rafael • 102 points
10 posts
-
1
votes4
answers1367
viewsA: Save dates in the right format (Orange)
The store method serves to create a record in the database taking the data that comes from a given form that has a path pointing to this controller method. public function store(Request $request) {…
-
2
votes4
answers1367
viewsA: Save dates in the right format (Orange)
To convert to DB format, you can do so: 'date' => Carbon::parse($request->date)->format('Y-m-d'), For the user can do so: $date = Carbon::parse($variavel->date)->format('d-m-Y');…
-
2
votes4
answers135
viewsQ: Quey Builder with IF condition in Lockable
People I have a problem to list certain results of a database using Arabic, and I have tried everything to elaborate a logic to list these results and I can not elaborate this logic. I have a table…
-
-1
votes1
answer148
viewsQ: How to recover values in a hasMany relationship in Latin
Personal I have the following function within a Model Campaign. public function success_payments(){ return $this->hasMany(Payment::class)->whereStatus('3'); } This function returns the Payment…
-
0
votes1
answer410
viewsQ: Radio type input check with jQuery
Good evening guys, I’m having a hard time here and I can’t seem to fix it. I have a checkout page where I display two means of payment, billet and card, the options for the user to select whether…
-
1
votes1
answer61
viewsQ: Problem with Utf8 encoding in Laravel
Guys I’m facing a problem with UTF8 coding, I don’t know what happens. When I print the text through the controller it is correct this way http://prntscr.com/ofcemt. But when I move the text to the…
-
0
votes1
answer69
viewsQ: Show Divs when category number increases
Guys, I have a table of categories. At the moment I have 3 categories, what I want is that when I register one more category, type 3 increased to 4, I want to show a specific div, because this div…
-
1
votes0
answers32
viewsQ: Problem in the logic of a tab system with relationship between tables
Personal I have two tables that relate to each other. Are they: Category: public function up() { Schema::create('categories', function (Blueprint $table) { $table->increments('id');…
-
0
votes2
answers751
viewsA: Problem in converting the input values into Real, example: R$ 20,00
See if that helps you. <script type="text/javascript"> function mascara(o,f){ v_obj=o v_fun=f setTimeout("execmascara()",1) } function execmascara(){ v_obj.value=v_fun(v_obj.value) } function…
-
-1
votes1
answer419
viewsQ: Check field only if it has any Laravel value
Guys I have a user registration system, in this system has a CPF field, where I use a class to validate it, but the field is not mandatory, and all the classes I tried to validate Cpf, validates…