k0tkin

k0tkin

Member Since 4 Years Ago

Experience Points 1,295
Experience Level 1

3,705 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 10
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.

21 Dec
5 months ago

k0tkin left a reply on How To Check Database Every Second With Laravel

@KOBEAR - Ok I guess this is the right way to do it Thank you for your answer

k0tkin left a reply on How To Check Database Every Second With Laravel

@TALINON - This is the easiest way to do it Thank you

k0tkin started a new conversation How To Check Database Every Second With Laravel

Hello everyone,

I'm working on a binary option app every time client open a trade it will expire 30 second or 1minute after opening time for example, if client open a trade at 1545400251 it will expire at 1545400251 + 30s (or 60s) I need to check database every second to check if any trade needs to be expired or not how to do that?

30 Dec
3 years ago

k0tkin started a new conversation Why Laravel Is Not Case Sensitive?

Hi,

I'm wondering why this two url is the same in Laravel? and how to make Laravel case sensitive?

http://localhost:8000/product/abcdef http://localhost:8000/product/ABCDEF

29 Mar
4 years ago

k0tkin left a reply on L5: \File::get($filePath) Kill My Session

I'm still trying but no success :( it seems i can't secure clients photos and i need to put them in public folder it's really bad :((

28 Mar
4 years ago

k0tkin left a reply on L5: \File::get($filePath) Kill My Session

By changing File model name problem is still available, and by changing ng-src to src problem solved for just couple of minutes and now problem is still there :(

27 Mar
4 years ago

k0tkin left a reply on L5: \File::get($filePath) Kill My Session

my problem solved by changing to

It seems ng-src send all 20 image request at the same time but src request one by one

but i don't like this solution, i like to know why laravel have this behavior

k0tkin left a reply on L5: \File::get($filePath) Kill My Session

With response()->download() problem is still the same, laravel kill my session after loading 20 images and i need to login to my application again Why loading 20 images is heavy? Let's imagine it's a heavy job why laravel kill my session because of that? (can i turn it off?)

Or another question: How to show images SECURELY (i don't want to use public directory to store my client private images)

k0tkin left a reply on L5: \File::get($filePath) Kill My Session

Each user in my application has a lot of images, i want to show my client at least 20 images in each page and here is my code and how i retrieve this images

HTML code:

<div class="row" >
    <div class="col-xs-6 col-md-4" ng-repeat="image in images">
        <a href="#" class="thumbnail">
            <img ng-src="@{{ getImage(image.display_name) }}">
        </a>
    </div>
</div>

AngularJS code:

app.controller('GalleryController', ['$scope', '$http', 'number', function ($scope, $http, number)
{
    $http.get('images/' + number).success(function (data)
    {
        $scope.images = data;
    });

    $scope.getImage = function(display_name)
    {
        return 'images/' + number + '/' + display_name;
    }
}
]);

Laravel Code

public function image($device_number, $display_name)
{
    $device = \Auth::user()->device($device_number);

    $fileName = \Cache::remember('device_number_' . $device_number . '_' . $display_name, 10, function () use ($device, $display_name)
    {
        return $device->images()->where('display_name', $display_name)->first(array('file_name'))->file_name;
    });

    $filePath = storage_path() . "/app/devices/" . $device->directory_name . "/" . $fileName;

    return response()->make(\File::get($filePath), 200, ['Content-Type' => 'image/png']);
}

k0tkin started a new conversation L5: \File::get($filePath) Kill My Session

Hi,

I'm trying to show images for each of my clients from storage directory instead of public directory to handling unauthorized access to images but there is a big problem after requesting more than about 20 response()->make(\File::get($filePath), 200, ['Content-Type' => 'image/png']); laravel kill my session and i need to log in to my application again and another big problem is my cpu usage is 100% each time i request this 20 images from my storage directory, any idea what's going on?

I'm using WAMP in windows 8.1 for my local server