MrLukman

MrLukman

Member Since 9 Months Ago

Experience Points 610
Experience
Level
Lessons Completed 0
Lessons
Completed
Best Reply Awards 0
Best Answer
Awards
  • Start Your Engines Achievement

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • First Thousand Achievement

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • One Year Member Achievement

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • Two Year Member Achievement

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • Three Year Member Achievement

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • Four Year Member Achievement

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • Five Year Member Achievement

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • School In Session Achievement

    School In Session

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

  • Welcome To The Community Achievement

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • Full Time Learner Achievement

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • Pay It Forward Achievement

    Pay It Forward

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

  • Subscriber Achievement

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • Lifer Achievement

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • Laracasts Evangelist Achievement

    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 Achievement

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • Laracasts Veteran Achievement

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • Ten Thousand Strong Achievement

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • Laracasts Master Achievement

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • Laracasts Tutor Achievement

    Laracasts Tutor

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

  • Laracasts Sensei Achievement

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • Top 50 Achievement

    Top 50

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

27 Jun
4 months ago

MrLukman left a reply on Signature Pad

@bashy thanks a lot man its all works now :)

26 Jun
4 months ago

MrLukman left a reply on Signature Pad

@bashy i meant i already know how to save the signature that i draw, on that canvas. But my problem is i cant draw anything on that canvas. Thanks

MrLukman left a reply on Signature Pad

https://imgur.com/FyEKOax

and this is the screenshot @bashy

MrLukman left a reply on Signature Pad

@bashy here's the head section

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/signature_pad.min.js"></script>

and this is the body

 <div id="signature-pad" class="m-signature-pad">
    <div class="m-signature-pad--body">
        <canvas style="border: 2px dashed #ccc"></canvas>
    </div>

    <div class="m-signature-pad--footer">
        <button type="button" class="btn btn-sm btn-secondary" data-action="clear">Clear</button>
        <button type="button" class="btn btn-sm btn-primary" data-action="save">Save</button>
    </div>
</div>

<script>
    $(function () {
        var wrapper = document.getElementById("signature-pad"),
        clearButton = wrapper.querySelector("[data-action=clear]"),
        saveButton = wrapper.querySelector("[data-action=save]"),
        canvas = wrapper.querySelector("canvas"),
        signaturePad;

        // Adjust canvas coordinate space taking into account pixel ratio,
        // to make it look crisp on mobile devices.
        // This also causes canvas to be cleared.
        window.resizeCanvas = function () {
            var ratio =  window.devicePixelRatio || 1;
            canvas.width = canvas.offsetWidth * ratio;
            canvas.height = canvas.offsetHeight * ratio;
            canvas.getContext("2d").scale(ratio, ratio);
        }

        resizeCanvas();
    });
</script>

thanks

25 Jun
4 months ago

MrLukman left a reply on Signature Pad

@bashy thanks for your help but it doesnt work, the window show up so does the clear and save button but i cant do anything there, its like the window is disable

MrLukman started a new conversation Signature Pad

hello im kinda new to laravel i want to implement this package

https://github.com/szimek/signature_pad

can someone teach me how to show that signature form in blade? i alrd understand the part on how to save it. thanks

im using laravel 5.4

29 May
5 months ago

MrLukman left a reply on Send Notif Via WhatsApp

thanks all for the help, gonna try 1 by 1

MrLukman started a new conversation Send Notif Via WhatsApp

Hello i wanna ask does anybody knows how to send notifications via WhatsApp? I want a method similiar to markdown mail, but the notif will be send to WhatsApp instead of email. Thanks

Iam using laravel 5.4

28 May
5 months ago

MrLukman left a reply on Display Multiple Images

thanks pal @lostdreamer_nl works like charm, also thanks for your advice

MrLukman started a new conversation Display Multiple Images

so i have multiple images in one field like this: images/1D6iU0KI_vpl1.jpg;images/UXJk3kcG_vectorpro-mt-slide1.jpg

my problem is, i cant retrieve any of that image, (works fine if it just 1 image);

my controller

$service= new Service();
$imagesdata=null;
if($request->hasfile('Image'))
         {

            foreach($request->file('Image') as $image)
            {
                $name=str_random(8)."_".preg_replace('/\s+/','_',($image->getClientOriginalName()));

                $destination='images/';
                $image->move($destination, $name);  
                
                $fullpath = $destination.$name;
                $imagesdata .= $imagesdata == null ? $fullpath : ';' .$fullpath;
                 
                // $data[]=$name;
               
                
                
            }
             
             $service->image = $imagesdata;

         }

my blade

 @foreach($service->image as $images)
            <div class="row">
              <img src="{{URL::to('images/'.$images)}}">
            </div>
            @endforeach

ps

<img src="{{asset($service->image)}}">

doesnt work.

Thanks

26 Mar
7 months ago

MrLukman left a reply on Upload Laravel 5.4 To Shared Hosting

thank you for the answer, all is fixed when i run php artisan config:clear and config:cache

25 Mar
7 months ago

MrLukman started a new conversation Upload Laravel 5.4 To Shared Hosting

hi guys i wanna ask, i face problem said.

SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: NO)

i already settings my .env to be the same with the database setting in cPanel. Thanks

22 Feb
8 months ago

MrLukman left a reply on Submit Form With Time Limit

@m-rk thank you pal, will definitely try it. :)

MrLukman left a reply on Submit Form With Time Limit

Yes i want to protect it from spam bots and spammers, which way the best way to do it? Cache, cookies or database? And compare to captcha which one is more reliable? Thanks

MrLukman started a new conversation Submit Form With Limit

hey guys i wanna ask, so i have a contact us form, and i want to set a limit, if the same user want to send another form they have to wait 3 minutes after the form they have submitted before. How can i do that? Thanks

11 Feb
9 months ago

MrLukman left a reply on Delete Warning

@skliche thanks man that's really works, you're the real mvp. Btw fyi

i dont know why but in firefox i have to add this code

<script>
 var self = $(this);

//display swal
</script>

below event.preventdefault(); in order to make it work. But anyway thanks again :)

10 Feb
9 months ago

MrLukman left a reply on Delete Warning

okay guys @Snapey @skliche so now i managed to display the warning, but when i press okay, the item is not deleted. here's my code.

<script>
 $('#delete').on('click', function(){
  event.preventDefault();
  swal("Are you sure?", {
   icon: "warning",
   dangerMode: true,
   buttons: true,
 }),
  function(){   
    $("#myform_id").submit();
  };

});
</script>

thanks again for the help

09 Feb
9 months ago

MrLukman left a reply on Delete Warning

@ejdelmonico my problem is the warning just dont appear, when i press delete button the item just deleted right away, without even a warning. And my swal in other pages woks just fine, so i have to figure out how to trigger the warning first when i press the delete button. sorry for my bad english, and thanks again

MrLukman started a new conversation Delete Warning

hey guys i wanna ask how to display a delete warning with sweet alert

here's my blade

 <form id="inbox" action ="{{ action('[email protected]', $inbox->id) }}" method="post">

                    {{csrf_field()}}
                    <input name = "_method" type="hidden" value="DELETE"/>
                    <button id ="delete" type = "submit" class = "btn btn-danger btn-xs" value= "Delete"/>
                      
                    </button>


<script>
 $('button.btn btn-danger btn-xs').on('click', function()
{

  // Display SweetAlert

   swal("Are you sure?", {
  icon: "warning",
  dangerMode: true,
  buttons: true,
}),

 //On clicking 'Yes, I am sure to delete'

 function(){  
      $(this).closest('#inbox').submit();
    }

}
   
</script>

the problem is when i press the delete button the item just deleted right away. thanks for the help

06 Feb
9 months ago

MrLukman left a reply on Markdown Mail

@MikeHopley Thanks for the help man, its all good now. Your solution works like charm :)

MrLukman left a reply on Markdown Mail

Thanks for the help man, its all good now. Your solution works like charm :)

MrLukman started a new conversation Markdown Mail

Hey guys i wanna ask how to generate dynamic url for markdown mail. this is my markdown view.

Thank you {{$user->name}} for registered. We just need you to confirm your email.

@component('mail::button', ['url' => {{url('/verify')}}/{{$user->token}}/{{$user->id}} ])

{{-- <a class="btn btn-success" href="{{url('/verify')}}/{{$user->token}}/{{$user->id}}">I'm Human</a> --}}

Verify

@endcomponent

the url that i got is http://localhost/QLab-Mecmesin/(/verify)/(%24user-%3Etoken/%24user-%3Eid)

which supposed to be "http://localhost/QLab-Mecmesin/verify/{$user->token}/{$user->id}"

it works fine if i just use href and remove the email button component. But i want to use it on email button component instead of href. Thank you. im using Laravel 5.4

MrLukman left a reply on Use Name In URL Instead Of Id

Thank you all that really solve the problem turns out my mistake was

public function show($id)
{
     $product = Product::find($id);

     return view('guest.productpage', compact('product'));
}

and all of you guys solution works like charm. :)

MrLukman left a reply on Use Name In URL Instead Of Id

@rin4ik So in my model i have this

 public function getRouteKeyName()
{
    return 'product_name';
} 

in my routes.php i have this

Route::get('/product/{product}','function(App\Product $product)
{

dd($product);

});

and it works.

But i want to render the page using controller, how do i do that? because this doesn't work

Route::get('/product/{product}','guest\[email protected]',function(App\Product $product)
{
return view('guest.productpage')->name('product');

});

MrLukman left a reply on Use Name In URL Instead Of Id

@rin4ik So in my model i have this public function getRouteKeyName() { return 'product_name'; }

in my routes.php i have this

Route::get('/product/{product}','function(App\Product $product) {

dd($product);

});

and it works.

But i want to render the page using controller, how do i do that? because this doesn't work

Route::get('/product/{product}','guest\[email protected]',function(App\Product $product) { return view('guest.productpage')->name('product');

});

05 Feb
9 months ago

MrLukman started a new conversation Use Name In URL Instead Of Id

Hi there i wanna ask how to change my url from myproject/product/{id} to myproject/product/name.

The name ofc belongs to the ‘id’ it self. Thanks for the help :)