felicia00

felicia00

Member Since 2 Months Ago

Experience Points
370
Total
Experience

4,630 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed
0
Lessons
Completed
Best Reply Awards
0
Best Reply
Awards
  • start your engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-in-session Created with Sketch.

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • subscriber Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • evangelist Created with Sketch.

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • chatty-cathy Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

Level 1
370 XP
Oct
14
6 days ago
Activity icon

Replied to How To Not Hit Error Exception When There Is No Value?

i wanted to make it like even if there is no any role for the user, the user still able to go to home page

Activity icon

Started a new Conversation How To Not Hit Error Exception When There Is No Value?

my expected result is i wanted to go to home page if there is not any user_role

<?php
        $profile = getUserInfo();


     if(!empty($user_role))
        {
        $user_role= explode(",", $profile->MultiUser);
        }
        else
        {
                $user_role=array();
        }
    ?>      
            @if(in_array(" ",$user_role))
            <div class="col-lg-4 col-md-6">
                <a class="card border border-dark hover-times" href="home">
                </a>
            </div>
            @endif
Oct
12
1 week ago
Activity icon

Started a new Conversation Is This The Correct Way To Use Array & Isset In Php?

$checkuser = getUser();
        $userrole=array($checkuser);

        if(isset($userrole))
        {
        $userrole= explode(",", $checkuser ->GetMultiRole);
        }
Sep
28
3 weeks ago
Activity icon

Started a new Conversation Multiply & Sum Up For Dynamic Created Rows

it works on the first row which isn't an append row. When i try to add a new row and type something in the quantity, the amount will show the same amount as the first row.

HTML

<table>
<tbody id="calculation">
<td><input class="underline-input" type="number" name="item" /></td>
<td><input class="underline-input multi" type="number" id="quantity" name="quantity" /></td>
<td><input class="underline-input multi" type="number" id="price" name="price" /></td>
<td><input class="underline-input amount" type="number" id="amount" name="amount"/></td>
</tbody>
<tr>
<th colspan="2">TOTAL RM</th>
<td><input class="underline-input" type="number" id="total" name="total" /></td>
</tr>
</table>

Script

  $(document).ready(function(){

        $('#calculation').on("keyup",".multi",function(){

        var quant= $('#quantity').val();
        var price= $('#price').val();

        $('.amount').val(quant* price);
        GrandTotal();

        });

        function GrandTotal(){
        var sum=0;

        $('.amount').each(function(){
        sum+=Number($(this).val());

        });

        $('#total').val(sum);

        }

    function addRow() {    
        var template = '';
        template += '<tr>';
        template += '<td><input class="underline-input" type="number" name="item" />
        template += '<td><input class="underline-input multi" type="number" id="quantity" name="quantity" />
        template += '<td><input class="underline-input multi" type="number" id="price" name="price" />
        template += '<td><input class="underline-input amount" type="number" id="amount" name="amount" /></td>';
        template += '</tr>';
    
        $("#calculation").append(template);

        });
Sep
27
3 weeks ago
Activity icon

Started a new Conversation Sum For Loop Values

is this the correct way to sum up loop values?

               @foreach($sum as $ind=>$dtl)
                        <?php
                            $total = 0;
                            $total += $dtl->amount;
                        ?>
                  @endforeach
                        <tr>
                            <th>TOTAL</th>
                            <td><input type="text" type="number" id="total" name="total" 
                              value="{{$total}}" /></td>
                        </tr>

i've tried but still cant get the sum value

Sep
09
1 month ago
Activity icon

Started a new Conversation How To Check If Checkbox Is Checked?

Is it the correct way to check if the check box is tick?

        <input type="checkbox" class="custom-control-input check" name="A" id="A" value= "<?php if(isset($resDtl[0]) && $resDtl[0]->A==1) echo "checked"; ?>" />
        <label class="custom-control-label" for="A">A</label>

JavaScript

var obj={};

      $(".check").each(function(){
            var name = this.name;
            if ($("[name='" + name + "']:checked").val() == true)
                obj[name] = true;
            else
                obj[name] = "";
        })

        return obj;
Aug
27
1 month ago
Activity icon

Started a new Conversation How To Make The Username Case Insensitive & The Password Case Sensitive?

So example my username is ABC and password is abc123 and i try to login with abc(username) and ABC123(pass) and manage to login

i try this method, but still able to login

      public function login(Request $request)
   {

    $check =  DB::table('user')->where('LoginID', strtolower($request->input('username')))->where('Password',$request- 
    >input('password'))->get();

   }
Jul
24
2 months ago
Jul
22
2 months ago
Activity icon

Started a new Conversation How To Call Stored Procedure Using Laravel And Send Mail?

Hi, I am beginner of laravel and MYSQL AND i wanted to call my stored procedure and pass the data to my blade page and then send mail

My Controller Page

public function mailsend()
{
$data=DB::statement('CALL SendMailABC(?,?,?)',
array(
'1', //ID
'User 2', //User
'David' //Name
));
\Mail::to('[email protected]')->send(new SendMail($data));
return 'A message has been sent to Mailtrap!';
}

My Mail Page

public function __construct($data)
{
$this->data=$data;
}
public function build()
{
return $this -> from('[email protected]', 'Test Mail')
-> subject('mail from mee')
-> view('mails.mailview')
->with([
'Login_ID'=>$this->prm_ID, //prm_ID is from sp field
'User'=>$this->prm_User, 
'Name'=>$this->prm_Name, 
]);
}

My Stored Procedure

CREATE DEFINER = 'root'@'localhost'
PROCEDURE SendMailABC( IN  prm_LoginID VARCHAR(80),IN prm_UserName VARCHAR(100), IN prm_ProjName VARCHAR(255))
BEGIN


SELECT
  Useremail,
  UserName,
  ProjName,
  RTNo
FROM mytable 
  Where mytable.LoginID =prm_LoginID;

END

Blade Page

<!DOCTYPE html>
<html>
<head>
    <title></title>
</head>
<body>

<p>Hi {{$User}},</p>


 <p>This is your Login ID {{$Login_ID}} and name {{$Name}}</p>


</body>
</html>

is this a correct way to write stored procedure? How can pass my SELECT data to laravel?