danlito

danlito

Montreal

Member Since 4 Years Ago

Experience Points 775
Experience
Level
Lessons Completed 32
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.

23 Mar
3 years ago

danlito started a new conversation Changing The User Table Names And Adding New Fields?

Hi guys,

I am trying to extend the users table by adding more fields and also i changed the user column name to username. Now i am getting an error:

"Column not found: 1054 Unknown column 'name' in 'field list'..."

I have migrated the table with new column name and also some new fields but its not working. Is this user column name somewhere hard-coded?

Any suggestion?

Thanks in advance.

19 Jan
3 years ago

danlito started a new conversation How Do You Guys Deal With Poiting Domain On Server To /public Folder?

Hi guys,

So far i have made possible to work this out on local server. I have tried some options around the net using .htaccess file but no success.

i'am pretty sure you know this trick :)

Thanks in advance.

17 Jan
3 years ago

danlito started a new conversation How Do You Protect .env File From Public?

Hello guys, I am trying to understand how to use this cool feature of. The only thing that i don't get it is how to make this file protected from public.

If i go to mydomain.com/.env i can see all the variables. Is there anyway to hide it?

Thanks

15 Dec
4 years ago

danlito left a reply on Rendering HTML From Database Table To View {{ Blade Issue Or... }}?.

@RachidLaasri My HTML is stored as text into database table. So it should render correct obviously .

danlito left a reply on Rendering HTML From Database Table To View {{ Blade Issue Or... }}?.

I get the same result as before, the above one shows the content as plain text and the second one shows nothing. same as i did without html_entity_decode.

danlito started a new conversation Rendering HTML From Database Table To View {{ Blade Issue Or... }}?.

I am having a problem by rendering some html stuff from a database table. I have a function that is calling and returning some html content from databse table, when i use {{ }} double curly braces it shows the content on page but as a plain text not rebdered as html. After i try to use {!! !!} it does not show anything on page. It's pretty weird, i don't understand why and what's the solution in this case.

Please advice.

11 Dec
4 years ago

danlito left a reply on Add Session Value With Ajax Post Seems Not Very Accurate.

Yes i always check it , when it fails it does not extend the session with the new values, the all sudden it happens.

danlito left a reply on Add Session Value With Ajax Post Seems Not Very Accurate.

It's the default one, i haven't touch anything on that session.php file

danlito left a reply on Add Session Value With Ajax Post Seems Not Very Accurate.

The session drive is:

    'driver' => getenv('SESSION_DRIVER') ?: 'file',

danlito left a reply on Add Session Value With Ajax Post Seems Not Very Accurate.

I can explain it, i know it's weird but is the only way i can make it work. When i do the first call the (if) statement checks if there is a session or not then try to push the session, i know that sometimes it will fail so for the first attempt i turn a "no" to tell to ajax try it again. Next time when ajax tries again the (if) checks if there is session or not if yes it turns an yes if not it tries again. :) i know is ridiculous but i have spend more then 7 hours to fix this and it looks like the only way is this. Most of the ways i end up with two ajax calls because the first attempt fails.

10 Dec
4 years ago

danlito left a reply on Add Session Value With Ajax Post Seems Not Very Accurate.

What i am doing now is this

$j(document).ready(function(){
$j('#codebtn').click(function(e){
    var code = 'TESTME';
    var codec = $j('#codec').val();
    if(codec != code){
        alert('This is not a valid');
    }else{
        $j.post("addcode", {cname: code, _token: _token}, function(data){
        if(data == 'no'){
        $j.post("addcode", {cname: code, _token: _token});
      }
});
    }
});
});
public function addCode(){

        if($_POST['cname']){

            if(!Session::has('__cp')){

                Session::put('__cp', $_POST['cname']);
                Session::save();
             return 'no';
            }else{
         return 'yes';
}
        }
    }

so basically i am forcing to try it again and again. so at the second try it works. It should not be like this.

danlito left a reply on Add Session Value With Ajax Post Seems Not Very Accurate.

Yes bashy i have try lets at my function return 'Yes' and it seems to work most of the time, but in some cases not. This is really weird to me.

danlito started a new conversation Add Session Value With Ajax Post Seems Not Very Accurate.

What i am doing is grabbing a value from an input field , passing it through ajax post which is pointed to a function. This function checks if session is empty or not then if false adds this session.

Then i have a simple place where i check this session and do some maths.

The trouble i am having it is not accurate, sometimes it fires sometimes not, maybe this is a bug or i am missing something here. I have tried to keep my code as simple as possible to see what is causing this issue.

Here is me code.

(_ This is my jquery code

$j(document).ready(function(){ $j('#couponbtn').click(function(e){ var code = 'TESTME'; var codec = $j('#codec').val(); var name = $j('input:checked').val(); var shipp = $j('select').val(); if(codec != code){ alert('This is not a valid'); }else{ $j('#codenarea').fadeOut(300); $j('#codemsg').fadeIn(300); $j.post("addcode", {cname: code, _token: _token}); } }); }); _)

(_This is my function that adds the session

public function addCode(){

    if($_POST['cname']){

        if(!Session::has('__cp')){

            Session::put('__cp', $_POST['cname']);
            Session::save();
        }
    }
}

_)

As i said before, in 20 tries 15 are successful and 5 not. I don't understand why.

Please advice. Thanks