Did anyone have a good example of using charts in laravel 6?

|
Dev 2020-04-25 06:48:09
TheGuyi 2020-04-25 06:44:56
@php
$ursb_flag = pending;
$rowclass = ‘yellow’;

if ($ursb_flag !== approved)
{
$ursb_flag = $post->ursb_verify_flag;
if ($rowclass == ‘red’) $rowclass = ‘white’;
else $rowclass = ‘grey’;
}
@endphp
<tr class=”{{ $rowclass }}”>
<td>{{ $post->ursb_verify_flag }}</td>
</tr>

Make sure your constants are defined and loaded correctly in the script.

DesolatorMagno 2020-04-25 06:48:11
Read it.
Dev 2020-04-25 06:48:54
TheGuyi 2020-04-25 06:44:56
@php
$ursb_flag = pending;
$rowclass = ‘yellow’;

if ($ursb_flag !== approved)
{
$ursb_flag = $post->ursb_verify_flag;
if ($rowclass == ‘red’) $rowclass = ‘white’;
else $rowclass = ‘grey’;
}
@endphp
<tr class=”{{ $rowclass }}”>
<td>{{ $post->ursb_verify_flag }}</td>
</tr>

The problem is with your constants.

TheGuyi 2020-04-25 06:51:15
Dev 2020-04-25 06:48:54
The problem is with your constants.

loaded correctly but the color is not changing its displaying the data but no color change.

TheGuyi 2020-04-25 06:51:23
TheGuyi 2020-04-25 06:51:15
loaded correctly but the color is not changing its displaying the data but no color change.

@php
$ursb_flag = ‘pending’;
$rowclass = ‘yellow’;

if ($ursb_flag !== ‘approved’)
{
$ursb_flag = $post->ursb_verify_flag;
if ($rowclass == ‘red’) $rowclass = ‘blue’;
else $rowclass = ‘green’;
}
@endphp
<tr class=”{{ $rowclass }}”>
<td>{{ $post->ursb_verify_flag }}</td>
</tr>

TheGuyi 2020-04-25 06:53:28
thanks @DesolatorMagno your right the constants had the problem but now new problem color is not changing
DesolatorMagno 2020-04-25 06:54:17
why should it update, the condition will be always the same.
DesolatorMagno 2020-04-25 06:54:38
it is always green, right?
TheGuyi 2020-04-25 06:56:46
DesolatorMagno 2020-04-25 06:54:38
it is always green, right?

no sir, if data from db is “approved =green”, if data from db is “pending = yellow”, if data from db “rejected=red”

TheGuyi 2020-04-25 06:57:16
that is why im needing the color change depending on value from db
DesolatorMagno 2020-04-25 06:57:28
That may be what you think it does, but it does another thing.
DesolatorMagno 2020-04-25 06:57:43
what color is each tr?
TheGuyi 2020-04-25 06:58:59
DesolatorMagno 2020-04-25 06:57:43
what color is each tr?

tr default value is pending = yellow

TheGuyi 2020-04-25 06:59:09
DesolatorMagno 2020-04-25 06:57:28
That may be what you think it does, but it does another thing.

oh my!!!!do you mind kindly pointing me in the right direction? thank you

DesolatorMagno 2020-04-25 06:59:38
i am asking you to help you, each tr is yellow?
TheGuyi 2020-04-25 07:00:22
DesolatorMagno 2020-04-25 06:59:38
i am asking you to help you, each tr is yellow?

yes sir

TheGuyi 2020-04-25 07:00:28
yellow
DesolatorMagno 2020-04-25 07:03:39
laravel_discuss-34732.jpg
Why u don’t use a more conventional if?
TheGuyi 2020-04-25 07:05:24
DesolatorMagno 2020-04-25 07:03:39
Why u don’t use a more conventional if?

yes , its what i am trying to do if you look at my code below;

@php
$ursb_flag = ‘pending’;

$rowclass = ‘yellow’;

if ($ursb_flag !== ‘approved’)
{
$ursb_flag = $post->ursb_verify_flag;
if ($ursb_verify_flag == ‘pending’)
$rowclass = ‘blue’;
else $rowclass = ‘green’;
}
@endphp
<tr class=”{{ $rowclass }}”>
<td>{{ $post->ursb_verify_flag }}</td>
</tr>

DesolatorMagno 2020-04-25 07:05:42
i talk about the second if
TheGuyi 2020-04-25 07:06:13
DesolatorMagno 2020-04-25 07:05:42
i talk about the second if

kindly elaborate please

DesolatorMagno 2020-04-25 07:06:23
if ($ursb_verify_flag == ‘pending’)
$rowclass = ‘blue’;
else $rowclass = ‘green’;
Bhavik F 2020-04-25 07:09:41
Did anyone have a good example of using charts in laravel 6?
TheGuyi 2020-04-25 07:22:20
DesolatorMagno 2020-04-25 07:06:23
if ($ursb_verify_flag == ‘pending’)
$rowclass = ‘blue’;
else $rowclass = ‘green’;

@DesolatorMagno thanks for the help; but its not changing color this is the code im running below.

@php
$ursb_flag = ‘pending’;
$rowclass = ‘yellow’;

if ($ursb_flag == ‘pending’)
{
$rowclass = ‘blue’;
}
else {
$rowclass = ‘green’;
}
@endphp
<tr class=”{{ $rowclass }}”>
<td>{{ $post->ursb_verify_flag }}</td>
</tr>

DesolatorMagno 2020-04-25 07:23:19
So you say it is still yellow?
TheGuyi 2020-04-25 07:24:08
DesolatorMagno 2020-04-25 07:23:19
So you say it is still yellow?

no color at all but value is being displayed from db “approved”

DesolatorMagno 2020-04-25 07:25:01
you made a css class for each color that change the color, right?
DesolatorMagno 2020-04-25 07:26:16
because i don’t see why you talk about color when you should talk about class, what you are changing ” ” is the class of the tr.
TheGuyi 2020-04-25 07:30:53
DesolatorMagno 2020-04-25 07:26:16
because i don’t see why you talk about color when you should talk about class, what you are changing ” ” is the class of the tr.

https://stackoverflow.com/questions/42284702/laravel-blade-change-row-color-when-variable-value-is-different-in-loop

Laravel Blade change row color when variable value is different in loopStack Overflow
I have a report page that loops through a collection and displays the data in a generic bootstrap template table – it’s showing data about users, and one user can have multiple rows in the table. I…
TheGuyi 2020-04-25 07:31:04
this is the solution i was following
DesolatorMagno 2020-04-25 07:31:59
Aja, but you need to make that class that change the color, it is not magic.
TheGuyi 2020-04-25 07:32:21
is there another method you think i should be using?
TheGuyi 2020-04-25 07:32:42
DesolatorMagno 2020-04-25 07:31:59
Aja, but you need to make that class that change the color, it is not magic.

noted let me create it and figure out a way

DesolatorMagno 2020-04-25 07:34:11
TheGuyi 2020-04-25 07:22:20
@DesolatorMagno thanks for the help; but its not changing color this is the code im running below.

@php
$ursb_flag = ‘pending’;
$rowclass = ‘yellow’;

if ($ursb_flag == ‘pending’)
{
$rowclass = ‘blue’;
}
else {
$rowclass = ‘green’;
}
@endphp
<tr class=”{{ $rowclass }}”>
<td>{{ $post->ursb_verify_flag }}</td>
</tr>

And this is like way overcomplicated, you could simply do.

class=”{{ $post->usrb_verify_flag == ‘pending’ ? ‘blue’ : ‘yellow’ }}”

DesolatorMagno 2020-04-25 07:36:30
If you have problem with these i advice you to take a step back and go back to the basic.

https://developer.mozilla.org/en-US/docs/Web/Tutorials
https://phptherightway.com/
https://laracasts.com/series/php-for-beginners
https://laracasts.com/series/laravel-6-from-scratch

TheGuyi 2020-04-25 07:37:10
DesolatorMagno 2020-04-25 07:34:11
And this is like way overcomplicated, you could simply do.

class=”{{ $post->usrb_verify_flag == ‘pending’ ? ‘blue’ : ‘yellow’ }}”

laravel_discuss-34751.jpg
error

DesolatorMagno 2020-04-25 07:37:13
Here is a ordened list of what i recommend for a newbie
TheGuyi 2020-04-25 08:18:32
DesolatorMagno 2020-04-25 07:34:11
And this is like way overcomplicated, you could simply do.

class=”{{ $post->usrb_verify_flag == ‘pending’ ? ‘blue’ : ‘yellow’ }}”

Failed

TheGuyi 2020-04-25 08:19:05
Which other method do you recommend? Kindly point me in the correct direction. I will do the research
TheGuyi 2020-04-25 08:43:13
Or video you can advise me to watch
2020-04-25 08:57:11
hey guys anybody use. three js in there web application…..?
2020-04-25 08:57:22
let me know
TheGuyi 2020-04-25 09:56:11
hey guys incase anyone els needs this : im using laravel 5.4 with php 5.6===> this is what has worked for me;;;;;;;;;;;;;

@php

if ( $post->dbdata == ‘approved’):
$color = ‘green’;
elseif ( $post->dbdata == ‘Pending’):
$color = ‘yellow’;
elseif ( $post->dbdata == ‘rejected’):
$color = ‘red’;
else:
$color = ‘black’;
endif;

@endphp
<tr style=”background-color: {{$color}}”>
<td>
<h6>{{ $post->dbdata }}</h6>
</td>
</tr>

TheGuyi 2020-04-25 09:56:29
TheGuyi 2020-04-25 09:56:11
hey guys incase anyone els needs this : im using laravel 5.4 with php 5.6===> this is what has worked for me;;;;;;;;;;;;;

@php

if ( $post->dbdata == ‘approved’):
$color = ‘green’;
elseif ( $post->dbdata == ‘Pending’):
$color = ‘yellow’;
elseif ( $post->dbdata == ‘rejected’):
$color = ‘red’;
else:
$color = ‘black’;
endif;

@endphp
<tr style=”background-color: {{$color}}”>
<td>
<h6>{{ $post->dbdata }}</h6>
</td>
</tr>

thank you @DesolatorMagno for pointing me in the correct direction

praneet81 2020-04-25 10:40:06
My question isn’t php based but i want to know has anyone used alpine js? I want to know how can i select all checkboxes by clicking on a checkbox that says select all using alpine js
2020-04-25 11:08:56
hello guys please i have been battling with this for more that 10hours now, i am working on a project with laravel and vue as the front end, every thins seems to work fine on localhost, but when i upload to a sheared host via git version control, the vue-router fail to load vue component, and no error was displayed on the console, and i also notice that javascript didnt work
i have edited the index.php file to point to my folder, css and images works fine
Bhavik F 2020-04-25 13:27:48
laravel_discuss-34771.jpg

Bhavik F 2020-04-25 13:28:09
Project completed during lockdown in 7 days
Boopathi K 2020-04-25 14:47:01
Hey guys any share the lumen best tutorial
esqui22 2020-04-25 16:13:51
Bhavik F 2020-04-25 13:27:48

Who is the ui theme?

|