davy_yg

davy_yg

Member Since 2 Years Ago

Jakarta

Experience Points 58,770
Experience Level 12

1,230 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-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-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-token Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • lara-evanghelist 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.

01 May
2 months ago

davy_yg left a reply on Escape String

please help. I don't really understand how the other escape string could perform sqlia?

davy_yg started a new conversation Escape String

Hello,

Can you tell me why :

\'  single quote
\"  double quote
\  backslash
\n  new line
\r  carriage return
\t  tab
\b  backspace
\f  form feed
\v  vertical tab (Internet Explorer 9 and older treats '\v as 'v instead of a vertical tab ('\x0B). If cross-browser compatibility is a concern, use \x0B instead of \v.)
LARACASTS_SNIPPET_PLACEHOLDER  null character (U+0000 NULL) (only if the next character is not a decimal digit; else it is an octal escape sequence)
\xFF    character represented by the hexadecimal byte "FF"

The rest besides ' and '' could be dangerous in performing sqlia if not using mysqli_escape_string?

11 Apr
3 months ago

davy_yg started a new conversation Prepared Statement

Hello,

This is php native question to prevent sqlia:

<?php 
$id = -1 ;
if(isset($_GET['id']))
    {
    $id = $_GET['id'];
}

$stmt = $db->prepare("select * from product where id = ?");

if($id == -1)
{
$stmt = $db->prepare("select * from product order by 1 asc limit 1;");
}
?>

<?php if ($stmt->execute(array($_GET['id']))) {
while ($b = $stmt->fetch()) { ?>

<div id="title"><?php echo $b->judul;?></div><br><br>
<div id="pic2"><img style="width:150px;height:150px;" src="images/<?php echo $b->image;?>"></div>
<?php echo $b->deskripsi;?>
</div>

<? }
}
?>

Warning: mysqli_stmt::execute() expects exactly 0 parameters, 1 given in /home/advancew/rustoleum.advance-web-studio.com/Rustoleum2.php on line 145

07 Apr
3 months ago

davy_yg started a new conversation Dispatch

What is dispatch for in Javascript?

26 Mar
3 months ago

davy_yg started a new conversation The Best Forum For React Native

Hello,

This might not having anything to do with laravel. I am assigned to do react native task. Any best forum for react native? Any clue?

Thanks in advance.

08 Mar
4 months ago

davy_yg left a reply on Selecting Row Number 2

@mushood

An uncaught Exception was encountered

Type: Error

Message: Call to undefined method CI_DB_mysqli_driver::skip()

Filename: C:\xampp\htdocs\masterlink_web\application\models\M_home.php

Line Number: 123

Backtrace:

File: C:\xampp\htdocs\masterlink_web\application\controllers\Home.php Line: 34 Function: our_servis_no2

File: C:\xampp\htdocs\masterlink_web\index.php Line: 315 Function: require_once

M_home.php

function our_servis_no2(){
    $r = $this->db->select('*')
            ->from('our_servis')
            ->skip(1)
            ->limit(1)
            ->get()->result();
    return $r;
}

Home.php

public function epoxy()
{
    $data['epoxy'] = $this->m_home->our_servis_no2();

    $this->load->view('public/epoxy', $data);
}

davy_yg started a new conversation Selecting Row Number 2

Hello,

I would like to know how to select row number 2 for example. only number 2. The id changes everytime there is an edit on that particular row.

davy_yg left a reply on Count(): Parameter Must Be An Array Or An Object That Implements Countable

There is nothing wrong with the back();

There is something wrong these:

 Products::where('prod_id', $product->prod_id)->delete();
    Wishlists::where('prod_id', $product->prod_id)->delete();
07 Mar
4 months ago

davy_yg left a reply on Count(): Parameter Must Be An Array Or An Object That Implements Countable

I do get prod_id for example 1 or 2.

dd($product->prod_id);

davy_yg started a new conversation Count(): Parameter Must Be An Array Or An Object That Implements Countable

When trying to delete a row I am getting this error message:

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

products.blade.php

<form style="display:inline" method="POST" action="{{url( '/cpages/products/'. $product->prod_id )}}">
        {{ csrf_field()}}
        {{ method_field('DELETE') }}
        <input type="submit" class="delete fix-inline-btn" value="Delete" />
      </form>

routes/web.php

Route::delete('/cpages/products/{product}', '[email protected]');

ProductsController.php

public function softDelete(Products $product)
    {

        Products::where('prod_id', $product->prod_id)->delete();
        Wishlists::where('prod_id', $product->prod_id)->delete();
        session()->flash('flash', 'Product Dihapus');

        return back();
    }

davy_yg left a reply on Base Url

What this mean:

URL::asset('themes/style/add.css')

Which exact folder does it refer to?

davy_yg left a reply on Base Url

Is URL::asset the same like public_html?

<link rel="stylesheet" href="{{ URL::asset('themes/style/add.css') }}" />

davy_yg started a new conversation Base Url

Hello,

I want to add base url in laravel, how to do so?

value="{{ $image->img_name }}"

Add base url to the value

davy_yg left a reply on Php Artisan Not Working

I cannot find both /etc/php5/apache2 and /etc/php5/cli/ inside php.ini files. I wonder which part do I need to edit?

davy_yg started a new conversation Php Artisan Not Working

Hello,

I wonder when trying to create controller I am getting this error message:

C:\xampp\htdocs\lekaeshop>php artisan make:controller PageController
PHP Warning:  Module 'mysqli' already loaded in Unknown on line 0

Warning: Module 'mysqli' already loaded in Unknown on line 0
Could not open input file: artisan

C:\xampp\htdocs\lekaeshop>php artisan
PHP Warning:  Module 'mysqli' already loaded in Unknown on line 0

Warning: Module 'mysqli' already loaded in Unknown on line 0
Could not open input file: artisan

C:\xampp\htdocs\lekaeshop>

How to solve it?

05 Mar
4 months ago

davy_yg started a new conversation Edit(elm)

Can someone help me explain this code:

function edit(elm){
    $.each(elm,function( i , el){
      $("#"+i).val(el);
    });
            
    $("#mdl-our-servis").modal('show');
}

Where does elm comes from? How about i and el?

Thanks in advance.

04 Mar
4 months ago

davy_yg started a new conversation FindOrFail();

Hello,

I wonder what is the difference between findOrFail and find ?

$Product = Product:findOrFail($id);

Thanks in advance.

22 Feb
4 months ago

davy_yg started a new conversation Style

I wonder if you can add a class component? for example:

<div class="class_A">

// I define this over since I cannot find the class_A below.  I would like to replace the background color.

class_A {

    background-color: yellow !important;

}

// This part is hidden and difficult to find since I can only find it through inspect element.
class_A {

    background-color: black;
    font: Arial;

}

Is it possible to redefine the class_A above?  Which style will the computer read?
13 Jan
6 months 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
6 months 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
6 months 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
6 months 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
6 months 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
6 months 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
6 months 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
6 months 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
6 months 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
6 months 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
6 months 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?