davy_yg

davy_yg

Member Since 1 Year Ago

Jakarta

Experience Points 58,150
Experience Level 12

1,850 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 317
Lessons
Completed
Best Reply Awards 0
Best Reply
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.

13 Jan
1 month ago

davy_yg started a new conversation Laravel Cart

Hello,

I have a question: I am watching laravel tutorials from a website. Which are using several laravel cart function such as:

cart::add, cart::remove, cart::update

I wonder if there are good documentations on the internet about this so that I can understand them better?

Thanks in advance.

10 Jan
1 month ago

davy_yg started a new conversation Location.href

Hello,

I would like to know why the apply button does not work? I wonder if I write the location.href incorrectly?

recruitment.blade.php

<div class="card-body" >
                            <p><?php echo Lang::get('message.job-intro1');?></p>
                            <div class="job-desc">                                    
                                <?php echo $data['description']; ?> 
                            </div>
                            <div class="career-background">
                                <h3>Background</h3>
                                <?php echo $data['background']; ?>
                            </div>
                            <div class="competencies">
                                <h3>Kompetensi</h3>
                                <?php echo $data['qualification']; ?>
                            </div><br>
                            <button class="btn btn-primary" onclick="location.href='{{ url("/form/".<?php echo $data["detail_id"]; ?>) }}'"> Apply </button><br>
                        </div>

davy_yg left a reply on Method Illuminate\Database\Eloquent\Collection::join

I added this:

use Illuminate\Support\Facades\DB;

and the same error still appears:

BadMethodCallException
Method Illuminate\Database\Eloquent\Collection::join does not exist.

davy_yg started a new conversation Method Illuminate\Database\Eloquent\Collection::join

Hello,

How to fix this error message:

Method Illuminate\Database\Eloquent\Collection::join does not exist.

PageController.php

public function application()
    {
        $data2 = ApplicationModel::all()
            ->join('tb_detail', function ($join) {
                $join->on('detail_id','=','detail_id');
            })
            ->get();

        // $data = ApplicationModel::all();

        return view('admin.application')->with('list', $data2);
    }

davy_yg started a new conversation Passing Value

Hello,

I would like to pass value id from PageController.php to the form.blade.php. I am not quite sure how to pull the detail id from the view. Is this the correct syntax:

{{ $JobDetail->detail_id }}

Please cek form.blade.php

PageController.php

public function form(Request $request)
    {

        $detail_id = $request->id;

        $JobDetail = JobDetailModel::get();     

        return view('form', compact('JobDetail'));
    }

form.blade.php

<form class="needs-validation" novalidate method="post" action="{{ Url('/saveapps') }}" enctype="multipart/form-data">
      <input type="hidden" name="_token" value="{{ csrf_token() }}"/>
            
            <input required type="hidden" class="form-control" id="nama" placeholder="" value="" name="{{ $JobDetail->detail_id }}">
08 Jan
1 month ago

davy_yg started a new conversation Form Feedback

Hello,

any clue where the comes from?

form.php

<div class="row">
          <div class="col-md-6 mb-3">
            <label for="name">Nama Lengkap</label>
            <input type="text" class="form-control" id="nama" placeholder="" value="" name="nama" required>
            <div class="invalid-feedback">
              Nama harus diisi
            </div>
          </div>
    </div>

davy_yg started a new conversation Custom Email Message

Hello,

I would like to create a custom email message. Can anyone help?

I only get this message: Please enter an email address

PageController.php

public function saveapps(Request $request) {

    Validator::make($request->all(), [
        
        "cover_letter" => "required|max:500",
        "nama" => "required",
        "jenis_kelamin" => "required",
        "tanggal_lahir" => "required",
        "nohp" => "required",
        "email" => "required|email",
        "alamat" => "required",
        "provinsi" => "required",
        "kota" => "required",
        "zip" => "required|integer",
        "status" => "required",
        "jumlah_tanggungan" => "required",
        "agama" => "required",
        "salary" => "required",
        "file_attachment" => "required",             
    ],
    [
        "cover_letter.max" => 'Maksimal 500 karakter', 
        "zip.integer" => 'Kode zip harus angka', 
        "email.email" => 'Tolong isi dengan format email',          
    ]
    )->validate();

form.blade.php

 @if ($errors->any())
          <div class="alert alert-danger">
              <ul>
                  @foreach ($errors->all() as $error)
                      <li>{{ $error }}</li>
                  @endforeach
              </ul>
          </div>
      @endif

...
    
<div class="mb-3">
          <label for="email">Email</label>
          <input type="email" class="form-control" id="email" name="email" placeholder="[email protected]">
          <div class="invalid-feedback">
            Mohon isi email Anda yang valid
          </div>
        </div>
07 Jan
1 month ago

davy_yg started a new conversation Custom Error Message

Hello,

I wonder why this custom message does not appears:

"zip" => 'Kode zip harus angka',

on the form when I enter alphabeth.

Validator::make($request->all(), [
        
            "cover_letter" => "required | max:500",
            "nama" => "required",
            "jenis_kelamin" => "required",
            "tanggal_lahir" => "required",
            "nohp" => "required",
            "email" => "required | email",
            "alamat" => "required",
            "provinsi" => "required",
            "kota" => "required",
            "zip" => "required | integer",
            "status" => "required",
            "jumlah_tanggungan" => "required",
            "agama" => "required",
            "salary" => "required",
            "file_attachment" => "required",             
        ],
        [
            "cover_letter.max" => 'Maksimal 500 karakter', 
            "zip" => 'Kode zip harus angka',            
        ]
    )->validate();


form.blade.php

 @if ($errors->any())
          <div class="alert alert-danger">
              <ul>
                  @foreach ($errors->all() as $error)
                      <li>{{ $error }}</li>
                  @endforeach
              </ul>
          </div>
      @endif

      <span style="color: red;">{{ $errors->first("zip") }}</span>  
    
      <h4 class="mb-3">Biodata</h4>

davy_yg started a new conversation Validation

Hello,

How to validate integer only?

like zip code

"zip" => "required",

davy_yg left a reply on Error Message Does Not Appears

I leave it blank. and it only highlight the textbox with red box with no error message. I expect error messages on top of the form mentions all the field that are required to be filled that have not been filled.

davy_yg left a reply on Error Message Does Not Appears

I try it does not work. I still wonder why. I also updated my form.blade.php

davy_yg started a new conversation Error Message Does Not Appears

Hello,

I would like to know why the error does not appears in here.

PageController.php

public function saveapps(Request $request)
        {

        Validator::make($request->all(), [
        
            "cover_letter" => "required | max:500",
            "nama_lengkap" => "required",
            "jk" => "required",
            "tgl_lahir" => "required",
            "nomor_ponsel" => "required",
            "email" => "required",
            "alamat" => "required",
            "provinsi" => "required",
            "kota" => "required",
            "zip" => "required",
            "status" => "required",
            "tanggungan" => "required",
            "agama" => "required",
            "salary" => "required",
            "attachment" => "required",             
        ],
        [
            "cover_letter.max"=>'Maksimal 500 karakter',
        
        ]
        )->validate();
    
    $m = new ApplicationModel;
        $m->nama_lengkap  = $request->nama;
        $m->jk            = $request->jenis_kelamin;
        $m->tgl_lahir     = $request->tanggal_lahir;
        $m->nomor_ponsel  = $request->nohp;
        $m->email         = $request->email;
        $m->alamat        = $request->alamat;
        $m->provinsi      = $request->provinsi;
        $m->kota          = $request->kota;
        $m->zip           = $request->zip;
        $m->status        = $request->status;
        $m->tanggungan    = $request->jumlah_tanggungan;
        $m->agama         = $request->agama;
        $m->salary        = $request->salary;

        $namafile = date("YmdHis") . "_" .                                                                                  $request->file_attachment->getClientOriginalName();
        $request->file_attachment->move("CV", $namafile);

        $m->attachment    = $namafile;

        $m->cover_letter         = $request->cover_letter;

        $m->save();

    Session::flash('flash', 'Data anda sudah di simpan');

    return redirect()->back();

}

form.blade.php

@if ($errors->any())
          <div class="alert alert-danger">
              <ul>
                  @foreach ($errors->all() as $error)
                      <li>{{ $error }}</li>
                  @endforeach
              </ul>
          </div>
     @endif
    
      <h4 class="mb-3">Biodata</h4>

davy_yg left a reply on Import Mysql File Into Mysql Linux

Do you understand anything about vmware?

I would like to import *.sql file into vmware. If I want to change the setting of the shared folder to import file I must power off before I change it correct?

Will poweroff the particular vmware file will reset the whole file? since I have a working vmware file on progress.

davy_yg started a new conversation Import Mysql File Into Mysql Linux

This is linux:

mysql>

Can you import *.sql file into mysql linux ?

Or do I have to create the db, tables, and insert the data with the insert command
04 Jan
1 month ago

davy_yg left a reply on Cart

I appologize. It's a tutorial from udemy. I do not find the files.

davy_yg left a reply on Cart

What's the database format from the Cart::content(); ?

Do they have the default cart model template ?

davy_yg started a new conversation Cart

Hello,

I would like to know how to interpret this code:

$cartItems = Cart::content();

Any clue what the codes means?

03 Jan
1 month ago

davy_yg started a new conversation Vmware Ubuntu

I need to test ubuntu web server on virtual machine and want to test if it works. I am using vmware workstation. And do I need to download vmware ubuntu?

basically something to make the ubuntu run on my vmware workstation.

Any clue?

davy_yg left a reply on Js Error

https://stackoverflow.com/questions/45879671/only-on-firefox-loading-failed-for-the-script-with-source

I still do not understand how to make this work in firefox without private browser since the user won't notice I bet! It works in chrome.

davy_yg started a new conversation Js Error

Hello,

I copy all my website to the server and the custom.js does not seems to work. I wonder why?

http://202.78.201.182/form

You can check the web console.

TypeError: $(...).load is not a function
[Learn More] custom.js:10:17
<anonymous>
http://202.78.201.182/js/custom.js:10:17

I wonder how to fix this error since it works on my local.

31 Dec
1 month ago

davy_yg left a reply on How To Close The Gray Bar

I try it and it does not work.

recruitment.blade.php

    <div class="list-group-item">
                        <div id="open">
                        <div class="gray d-none">
                        <div class="card-header d-none" data-toggle="collapse" data-target="#collapse<?php echo $i ?>">
                            <a class="btn btn-link" > <?php echo $data['position'].'<br>'; ?></a>
                             
                            <span style="float: right;"><span class="fa fa-plus"></span></span>
                            <span style="float: right;"><span class="fa fa-minus"></span></span>                                    
                        </div>
                        </div>                        
                        </div><br>
                        <div class="expanded">
                        <div class="card-body" id="collapse<?php echo $i ?>">
                            <p><?php echo Lang::get('message.job-intro1');?></p>
                            <div class="job-desc">                                    
                                <?php echo $data['description']; ?> 
                            </div>
                            <div class="career-background">
                                <h3>Background</h3>
                                <?php echo $data['background']; ?>
                            </div>
                            <div class="competencies">
                                <h3>Kompetensi</h3>
                                <?php echo $data['qualification']; ?>
                            </div><br>
                            <button class="btn btn-primary" onclick=" location.href='{{ url("/form") }}'"> Apply </button><br>
                        </div>
                        </div>
                    </div>

davy_yg left a reply on How To Close The Gray Bar

There is a gray bar in the ui just like collapse bar if you click the gray bar then all the text will appears. if you click it once again it will hide all the text.

It will expect it will hide the text in the beginning of the web.

30 Dec
1 month ago

davy_yg started a new conversation How To Close The Gray Bar

Hello,

I would like to know why on the beginning of opening the windows the gray bar remains open.

recruitment.blade.php

    <div class="gray">
                        <div class="card-header" data-toggle="collapse" data-target="#collapse<?php echo $i ?>">
                            <a class="btn btn-link" > <?php echo $data['position'].'<br>'; ?></a>
                             
                            <span style="float: right;"><span class="fa fa-plus"></span></span>
                            <span style="float: right;"><span class="fa fa-minus"></span></span>                                    
                        </div>
                        </div>

I would like the gray bar closed on the beginning of the program.

Any clue how?

28 Dec
1 month ago

davy_yg left a reply on I Cannot Login

Can you do that on the server? It works on my local but not on the server

davy_yg started a new conversation I Cannot Login

Hello when trying login to my local login that usually works. This time does not works. I wonder why?

I get this error message on console. How to fix it?

Password fields present on an insecure (http://) page. This is a security risk that allows user login credentials to be stolen.[Learn More] 202.78.201.182

Loading failed for the <script> with source “http://202.78.201.182/vendor/bootstrap/js/bootstrap.bundle.min.js%7D”. 202.78.201.182:51:1

Loading failed for the <script> with source “http://x-tags.net/data/dmp/tag?p=1&tcid=e789254b7f965c16969a8bc8d4d84778ed6b4366”.
27 Dec
1 month ago

davy_yg left a reply on Upload Attachment

Yes, after the upload the link turns into:

C:\xampp\tmp\php28E7.tmp

I should be able to upload a word or a pdf doc

davy_yg started a new conversation Upload Attachment

Hello,

I would like to upload file attachment to the correct location.

form.blade.php

<div class="custom-file">
                <!-- <button><input type="file" class="custom-file-input" id="file_attachment" name="file_attachment">Choose File</button> -->
                <input type="file" class="custom-file-input" id="file_attachment" name="file_attachment" required>Choose File2
                <label class="custom-file-label" for="validatedCustomFile">Choose file...</label>
            <div class="invalid-feedback">Example invalid custom file feedback</div>
            </div>

PageController.blade.php

$m = new ApplicationModel;

$m->attachment    = $request->file_attachment;

$m->save();

When I check the upload address : C:\xampp\tmp\php28E7.tmp

This is strange the file is CV.doc - it should be word document.

davy_yg started a new conversation Change + And - Sign

recruitment.blade.php

    <!-- Heading End-->
            <div class="panel">
                <div class="list-group">
                    <div class="list-group-item">
                        <div id="open">
                        <div class="gray">
                        <div class="card-header">
                            <a class="btn btn-link" data-toggle="collapse" data-target="#collapse<?php echo $i ?>"> <?php echo $data['position'].'<br>'; ?></a>
                             
                            <span style="float: right;"><span class="fa fa-plus"></span></span>
                            <span style="float: right;"><span class="fa fa-minus"></span></span>                                    
                        </div>
                        </div>                        
                        </div><br>
                        <div class="expanded">
                        <div class="card-body" id="collapse<?php echo $i ?>">
                            <p><?php echo Lang::get('message.job-intro1');?></p>
                            <div class="job-desc">                                    
                                <?php echo $data['description']; ?> 
                            </div>
                            <div class="career-background">
                                <h3>Background</h3>
                                <?php echo $data['background']; ?>
                            </div>
                            <div class="competencies">
                                <h3>Kompetensi</h3>
                                <?php echo $data['qualification']; ?>
                            </div><br>
                            <button class="btn btn-primary" onclick=" location.href='{{ url("/form") }}'"> Apply </button><br>
                        </div>
                        </div>
                    </div>

            <?php $i++;  }   ?>          

                    
                    </div>                            
                </div>


    ....
    
    <script>

        $( ".btn btn-link" ).click(function(e) {

        if(!$('.btn btn-link').hasClass('expanded')) {

        $('.btn btn-link').addClass('expanded');
    
        $(".fa fa-plus").addClass("d-none");
        $(".fa fa-minus").removeClass("d-none");       
        $(".card-reader .fa fa-minus").hide();
        $(".card-reader fa fa-plus").show();  
  
        } else {

        $('.btn btn-link').removeClass('expanded');        
    
        $(".card-reader .fa fa-plus").removeClass("d-none");   
        $(".card-reader .fa fa-minus").addClass("d-none");          
        $(".card-reader .fa fa-minus");
        $(".card-reader fa fa-plus").hide();  
        }

        });

davy_yg left a reply on Hide Flash Message

includes/flash.blade.php

@if ($message = Session::get('flash'))  
<div class="alert alert-info">  
<ul>
        {{ $message }}
</ul>
</div>
@endif

davy_yg started a new conversation Hide Flash Message

How to hide flash message?

I wonder what's missing? I waited for along time and the message still stays there.

<head>

<!-- bootstrap -->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js">                                                                                  </script>

</head> 

...

@include('includes.flash')

...

<script>

    $(document).ready(function(){
          $(".alert").delay(5000).slideUp(300);
    });

    </script>
26 Dec
1 month ago

davy_yg started a new conversation Call To A Member Function Count() On Null

How to solve this error message:

Call to a member function count() on null

PageController.php

public function saveadduser(Request $request)
    {

        $data = UserWebModel::where('email', $request->email)->first();

        if($request->password != $request->conf_password)
        {

            Session::flash('flash', 'Please type the same password');
        }
        elseif($data->count() > 0)
        {

            Session::flash('flash', 'Please enter a different email address');
        }
        else

davy_yg left a reply on Different Access

How do I know which user is currently login? Do I have to use session?

davy_yg left a reply on Different Access

I don't understand how? Last time someone mentions to use middleware but I do not understand either the practice.

davy_yg started a new conversation Different Access

Hello,

I would like to know how to distinguise the access when two different people login: Admin vs Staff.

When Staff login they must not be able to see user menu.

But when Admin login they will be able to see the user menu.

Any clue how to do this?

25 Dec
1 month ago

davy_yg started a new conversation I Can't Submit My Form

form.blade.php

<form method="post" action="{{ Url('/saveapps') }}">

...

<input type="submit" name="submit" value="submit" class="btn btn-primary btn-lg btn-block">
     </div>
    </form>

When I press submit I get this error :

419 Sorry, your session has expired. Please refresh and try again. 

I wonder why?

24 Dec
1 month ago

davy_yg started a new conversation Call To Undefined Function App\Http\Controllers\flash()

Hello,

How to solve this error message:

Call to undefined function App\Http\Controllers\flash()

PageController.php

   flash('Data sudah di delete');

Any clue how to solve the issue?

23 Dec
1 month ago

davy_yg started a new conversation Include

Hello,

I wonder how to fix this error message:

@include('navigation')

views/admin/navigation.blade.php

View [navigation] not found. (View: C:\xampp\htdocs\website_ids3\resources\views\admin\job_master.blade.php)

I wonder why?

davy_yg left a reply on Root Folder

@globals - so I can place the bower_components folder in the laravel root folder after adding:

webpack.mix.js

//mix file
mix.copy('/bower_components/bootstrap/dist/css/bootstrap.min.css', 'public/css')

davy_yg left a reply on Root Folder

I already have the file in my public directory. I wonder why using this link won't work:

22 Dec
1 month ago

davy_yg started a new conversation Vimeo Error

Hello,

I cannot play the video nor download laracasts video since the last laracasts website update.

This site can’t be reached player.vimeo.com took too long to respond.

Always vimeo prob. even after I change the web browser. Any clue how to solve this error?

I cannot open vimeo.com either.

davy_yg left a reply on Root Folder

@globals - I cannot understand why I cannot play the video, when I check the console I get this error message: ReferenceError: "Vimeo is not defined".

I also cannot open vimeo.com website - always Time Out

davy_yg left a reply on Root Folder

How to publish my assets?

davy_yg left a reply on Root Folder

So I can change it with this:

<link href="{{ asset('bower_components/bootstrap/dist/css/bootstrap.min.css') }}" rel="stylesheet">

I tested and it seems like all my css links does not loads.

davy_yg started a new conversation Root Folder

Hello,

I would like to get a file from laravel root folder. how to do so?

 <link rel="stylesheet" href="template/bower_components/bootstrap/dist/css/bootstrap.min.css">

What do I need to write in the codes?

20 Dec
1 month ago

davy_yg left a reply on How To Create Paging Https://datatables.net/

Do I need to add some codes using laravel also besides https://datatables.net ?

davy_yg started a new conversation How To Create Paging Https://datatables.net/

Hello,

How to create paging using datatables.net. I try to create paging using https://datatables.net/ I try it but the paging does not appears. Any clue why?

19 Dec
2 months ago

davy_yg started a new conversation Parameter Must Be An Array

Hello,

How to solve this error message? I cannot understand.

count(): Parameter must be an array or an object that implements Countable

$data = UserWebModel::where('email',$email)->first();
    
    if(count($data) > 0){ //apakah email tersebut ada atau tidak

davy_yg started a new conversation Pressed Button

I am trying to create a link when the button is being pressed.

<button class="btn btn-primary" onclick="location.href='{{ url(/form) }};'>Apply</button>

Yet, when the button is being pressed this is what happened.

syntax error, unexpected '/' (View: C:\xampp\htdocs\website_ids3\resources\views\recruitment.blade.php)

18 Dec
2 months ago

davy_yg started a new conversation Undefined Variable: JobDetail

Hello,

I don't know how to solve this problem.

Undefined variable: JobDetail (View: C:\xampp\htdocs\website_ids3\resources\views\recruitment.blade.php)

...


PageController.php

  public function recruitment()
    {

        $JobDetail = JobDetailModel::get();      
    
        return view('recruitment', $JobDetail);
    }


recruitment.php

foreach($JobDetail as $data){ ?>
17 Dec
2 months ago

davy_yg left a reply on Php Artisan Serve

I type it manual in the browser then it keeps loading and loading.

I wonder why?