darkec

darkec

Member Since 3 Years Ago

Experience Points
620
Total
Experience

4,380 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
0
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.

Level 1
620 XP
26 Mar
5 months ago

darkec left a reply on Expiry Of Laravel_token

Answer.

As per documentation ". This cookie contains an encrypted JWT that Passport will use to authenticate API requests from your JavaScript application"

I realized that this laravel_token will not expire, only cookie that is set in browser after login can/will expire, when it expires, laravel_token won't be valid anymore.

On the other hand API JWT tokens have expiry time

25 Mar
5 months ago

darkec started a new conversation Expiry Of Laravel_token

I'm using laravel_token for AJAX calls from my site. I set token and refresh to be 1 minute to test it out. I can't figure it out how does it work.

What happens when both tokens expire and user is logged in?

02 Mar
6 months ago

darkec left a reply on Datetime::setTimestamp() Expects Parameter 1 To Be Int, Float Given

The solution was to install new 64bit XAMPP

darkec left a reply on Let's Encrypt SSL Too Many Redirects

@SHOVELS - Thank you very much

darkec left a reply on Too Many Redirect When Active SSL

@ALEV - Thank you very much :D

01 Mar
6 months ago

darkec started a new conversation Datetime::setTimestamp() Expects Parameter 1 To Be Int, Float Given

After I upgraded to Laravel 5.8 it doesn't work on my laptop with XAMPP. It says: Datetime::setTimestamp() expects parameter 1 to be int, float given

14 Jun
1 year ago

darkec started a new conversation Does RefreshDatabase Rollback Changes After Each Test Of At The End Of All

Let's say I have simple test with 2 functions:

public function testCreateUser()
{
    User::create(['username' => 'test']); 
}

And this is where I create a user and it has id=1.

Now I want to get that user in next test function

public function testGetUser()
{
    User::find(1); 
}

Will this user be in my database or will RefreshDatabase rollback my changes after it finishes with testCreateUser() so my user won't be saved in the database?

22 Aug
2 years ago

darkec left a reply on Polymorphic Relation Returns Query Like "Is Null And Is Not Null"

The problem was with this:

$this->homeStorages->storageLoads()->toSql();

I was taking all records and relations to them, but when I do this:

$this->homeStorages->find(1)->storageLoads()->toSql();

It works just fine

21 Aug
2 years ago

darkec started a new conversation Polymorphic Relation Returns Query Like "Is Null And Is Not Null"

I created polymorphic relation and it works just fine, but when I query it I get query like this one:

select * from `storage_loads` 
where `storage_loads`.`storage_id` is null and `storage_loads`.`storage_id` is not null and `storage_loads`.`storage_type` = ?

The problem is this part

where `storage_loads`.`storage_id` is null and `storage_loads`.`storage_id` is not null 

This is my relation inside HomeStorages model

    public function storageLoads()
    {
        return $this->morphMany( 'StorageLoads\Model', 'storage');
    }

This is my query

$this->homeStorages->storageLoads()->toSql();

Why Laravel adds "is null and is not null"

07 Aug
2 years ago

darkec left a reply on Running Laravel Script Via CLI

I'm on shared hosting and can't user Redis, this is just temporary solution I want to use, simple cron job

darkec started a new conversation Running Laravel Script Via CLI

My script requires long execution, 5+ minutes. The best solution for me is to run my script via CLI, but which way is the best from Laravel's perspective.

  1. I read about Task Scheduling https://laravel.com/docs/5.4/scheduling which is a good solution since it is run via Cron Job and that is something I need. But is that script called as CLI command and does it have execution time?

  2. Second is https://laravel.com/docs/5.4/artisan#generating-commands my own command. Which is called via CLI and I can make it execute my script.

Which is better to take and keep in mind I need execution time to be almost unlimited

22 Jun
2 years ago

darkec started a new conversation Limit On The WHERE Col IN (…) Condition

When using relations in Laravel, queries are like:

SELECT * FROM table
WHERE Col IN (1,2,3,4,5...)

Did anyone encountered with the problem of it, I guess there must be a limit of ids within IN()

09 May
2 years ago

darkec left a reply on Debug = False Is Not Working

I've tried all of that :/

darkec left a reply on Debug = False Is Not Working

Still not working this is what I get. This "debug" part is killing me

{
  "error": {
    "message": "Parse error: syntax error, unexpected '=>' (T_DOUBLE_ARROW), expecting ']'",
    "status_code": 500,
    "debug": {
      "line": 103,
      "file": "E:\\xampp\\htdocs\\app\\Api\\V1\\Controllers\\Messages\\MessageController.php",
      "class": "Symfony\\Component\\Debug\\Exception\\FatalThrowableError",
      "trace": [
        "#0 E:\\xampp\\htdocs\\vendor\\composer\\ClassLoader.php(322): Composer\\Autoload\\includeFile('E:\\\\xampp\\\\htdocs...')",
        "#1 [internal function]: Composer\\Autoload\\ClassLoader->loadClass('App\\\\Api\\\\V1\\\\Cont...')",
        "#2 [internal function]: spl_autoload_call('App\\\\Api\\\\V1\\\\Cont...')",
      ]
    }
  }
}
08 May
2 years ago

darkec left a reply on Debug = False Is Not Working

Unfortunately not working

darkec left a reply on Debug = False Is Not Working

they are from .env config/app.php is left as it is during installation (it's taking all values from .env file)

darkec started a new conversation Debug = False Is Not Working

I set my .env as follows:

APP_ENV=production
APP_DEBUG=false
APP_LOG_LEVEL=info

But it stills shows me debug messages and trace in API. Why is that?

05 May
2 years ago

darkec started a new conversation Logging/Debugging API

Hi

Is there any way I can log/debug my APIs to see number of queries and similar logs. I tried with debugbar and ajax but it's not working. I've tried everything I could think of or find online, nothing is working.

I'm using latest Laravel with Dingo API and Laravel Debugbar

Does anyone has a solution?

18 May
3 years ago

darkec started a new conversation Laravel Cache Dependency

Hi In yii, we could use cache dependency. For example:

$sql = 'SELECT * FROM tbl_post LIMIT 20';
$dependency = new CDbCacheDependency('SELECT MAX(update_time) FROM tbl_post');  
$rows = Yii::app()->db->cache(1000, $dependency)->createCommand($sql)->queryAll();

And when query result be changed, the cache content will also change before expiration and then will send to output. How to do this job in the laravel? Is there any bundle for this task?

21 Apr
3 years ago

darkec left a reply on Validator::make

Such simple solution, I was trying to "use" some different Validators, all I need to do is to "use Validator" before implementation of "class"

20 Apr
3 years ago

darkec left a reply on Validator::make

This is what I get ErrorException in ApiAuthController.php line 116: Non-static method Illuminate\Validation\Factory::make() should not be called statically, assuming $this from incompatible context after Validator::make is called

darkec started a new conversation Validator::make

What Validator is used here https://laravel.com/docs/5.0/validation when Validator::make is called?