kitman

kitman

Member Since 1 Year Ago

Experience Points 9,300
Experience Level 2

700 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 87
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.

04 Jul
2 weeks ago

kitman left a reply on .ENV DEPLOYMENT FOR PRODUCTION SERVER

But then the problem is if I using AWS I have a load balance it will auto scales up and down the server according to the traffic, It won't be possible for a devops to wake up 3am and to set the env manually in production server

kitman started a new conversation .ENV DEPLOYMENT FOR PRODUCTION SERVER

hI,

I want to ask how to do people deploy there .env files on production server

  1. using ci/cd tool to cpy .env.example .env
  2. devops login the server and manual copy and rename form .env.example to .env
  3. Others ways

If using the 1 way it will have security issues because we are uploading to DB password and stuff to git, how to solve that problem.

If using the 2 way does that mean as a programmer everytime I create add/change a new variable(eg: third party api link) I have to tell the devops to add one on the production server, and also if I have multiple servers then I have to manual do it couple times which does not make much sense plus if the programmer forgot to tell the devops about it will create a problem as well ?

05 Oct
9 months ago
19 Jul
1 year ago

kitman started a new conversation Best Practice Of Unit Test An Search Function

Hi,

We are trying to write the unit test for a search function. The search function will then create a database query based on user input, since there are some many cases I assume that no one will write the case one by one, so I wanted to know what is the best practice of doing the search function?

17 Jul
1 year ago

kitman started a new conversation Any Tools That Managing Project Dependencies?

So in our company we have a local test and live environment and 3 projects, so sometimes I uploaded to code and waiting for our tester to test which take a couple days. After she tested I tested it I needed to merge the code to master. but since there were so many things to do between, I forgot to tell her that she has to merge the project B and project C as well for the project A to work and actually didn't recognize it until the customer complains, so I was wondering are there any tools that remind you that this task, you would need to merge project B and Project C for Project A to work?

kitman started a new conversation Proper REST Response Code For A Valid Request But An Empty Data?

Hi

For example you run a GET request for users/email but there is no user with this.I have saw someone said to use 404 https://stackoverflow.com/questions/11746894/what-is-the-proper-rest-response-code-for-a-valid-request-but-an-empty-data, which not sure is it correct? so the question what should I return in the following example

I'm creating a registration form and the data will be submitted to third-party database, so each time I would need to check is there an email already exists in the third party database if no user then it can continue else return error message. code below

function stepOne() { try { $res = GuzzleHttp( 'GET', 'https://abc.com/api/v1/email_exists/[email protected]' );

    if ( $res->getStatusCode() === 200 ) {
        return 'email exists';
    }
} catch ( Expection $e ) {
    if ( $e->getStatusCode() === 404 ) {
        //should return true and pass unit test because there is no email address at third party database
        return true;
    }
}

}

//However is will have problrem is you write the wrong URI/URL function stepOne() { try { //someone wrote a bug by acciecent this URI/URL does not exists $res = GuzzleHttp( 'GET', 'https://abc.com/v1/email_existsss/[email protected]');

    if ( $res->getStatusCode() === 200 ) {
        return 'email exists';
    }
} catch ( Expection $e ) {
    //LOGIC CONFLICT
    if ( $e->getStatusCode() === 404 ) {
        //should return false and not pass unit test because the uri/url in incorrect not because it can't find the email address
        return false;
    }
}

}

02 Apr
1 year ago

kitman started a new conversation How To Revert Data For This Unit Test

hi,

my fd told me that for every single test we only revert the data that it created for that test, so then we looked at the laravel doc and the only method we can use is "use RefreshDatabase;". but this will clear all the data in every table, I explain why laravel have to do it that way, but he still thinks it is strange, so is there a way we can revert the data that we created for this test, and if not why?

20 Mar
1 year ago

kitman started a new conversation Should I Separate My System?

Hi everyone,

I trying the create 3 system/projects, which are the API posts system, API Landing page system and an API auth system which connects all other two systems not sure is it a good idea? the reason behind this is because the company that I work for changes their website quite often, in the past they have changed from their own cms to using WordPress a year ago, however, they wanted to keep all the posts from the old CMS, and now wanted to do a new website again with Drupal, another problem is these posts are used by another system (products) as well and need to sync the post to the other system, my point of view is separating the three system have the following benefits

  1. ppl can use our api if wanted, does not matter what CMS they use, they can just read the data.
  2. more than one application can access the data. 3.In some time there will be new ways of promoting the business(eg: VR ) so landing pages or posts will maybe not used. we just needed to disconnect from the auth system.
  3. does not matter how the front-end changes it will not effect backend programmers.
14 Mar
1 year ago

kitman started a new conversation Difference Between Storage::put And Storage::move

Was trying to google and look at Laravel doc, but could not find any answer what is the difference between, and when should we use put or move?

kitman left a reply on Phpunit Fake Image Error

$file->move($move_path, $fileOriName); was using old version https://laravel.com/docs/5.1/requests , should use Storage::move($move_path , $fileOriName);

11 Mar
1 year ago

kitman started a new conversation Phpunit Fake Image Error

Not sure is it a bug I trying to call this function UploadedFile::fake()->image('avatars1'); , and return (ini_set(): Use of iconv.output_encoding is deprecated), full message : "Could not move the file "C:\Users\kitmanyiu\AppData\Local\Temp\phpFCD2.tmp" to "E:\work\formV3\public/uploads/201803\00q0l000004dm8heas-pid-1520821265-74_jCSh3wBbKFXQs4IiZJLbxDRIQ8BRY2pk." (ini_set(): Use of iconv.output_encoding is deprecated), how can I slove this problrem, I using laravel v5.5 and php 7.1.8 with Wnmp3.1.0 on Window 7

08 Mar
1 year ago

kitman left a reply on Reload Browser In Dusk

remove "protected $runTestInSeparateProcess = TRUE;"

07 Mar
1 year ago

kitman left a reply on Reload Browser In Dusk

Gives me his error

PHPUnit_Framework_Exception: PHP Fatal error: Uncaught Illuminate\Contracts\Container\BindingResolutionEx ception: Target [Illuminate\Contracts\Debug\ExceptionHandler] is not instantiable.

kitman started a new conversation Reload Browser In Dusk

In dusk ,after I open the browser, how can I reload the page , or either close and open the browser again?

05 Mar
1 year ago

kitman started a new conversation Request->all() Security Issue ?

me and my friend thought if we are a hacker ,we can do something like $postLink = "http://www.xyz.com?"; ($i < 0 ; $i < 10000000000000 ; $i++){ $postLink += "abc" + i; }

curl('post' , $postlink);

by doing that I can slow down the server is that correct? because it needs to read every single input that I pass in