Thavarshan

Thavarshan

Member Since 10 Months Ago

Trincomalee, Sri Lanka

Engineering Student at IESLCE

Experience Points 49,980
Experience Level 10

20 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 485
Lessons
Completed
Best Reply Awards 1
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.

10 Apr
2 months ago

Thavarshan started a new conversation BladeComilerTest Failing

I've been testing the Laravel frameworks tests specifically the Blade compiler tests just so I can get an understanding of how things work. I'd like to make my own template compiler (Just for the sake of learning).

Four of the tests in the ViewBladeCompilerTest.php file fail and output the following:

Mockery\Exception\NoMatchingExpectationException: No matching handler found for Mockery_0_Doktrin_Filesystem_Filesystem::put('/Users/thavarshan/Codebase/Valet/framework/tests/View/0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33.php', 'Hello World'). Either the method was unexpected or its arguments matched no expected argument list for this method
/Users/thavarshan/Codebase/Valet/framework/vendor/mockery/mockery/library/Mockery/ExpectationDirector.php:92
/Users/thavarshan/Codebase/Valet/framework/src/Doktrin/View/Compilers/BladeCompiler.php:126
/Users/thavarshan/Codebase/Valet/framework/tests/View/ViewBladeCompilerTest.php:53
/Users/thavarshan/Codebase/Valet/framework/vendor/phpunit/phpunit/phpunit:61

Anyone know why and how I can fix it?

I've been fiddling around with the code but haven't changed anything.

30 Mar
2 months ago

Thavarshan left a reply on Checkbox In Laravel

@VISHAAL - I don't mean checkboxes inside the controller. Thats impossible. What I mean is send data through the checkboxes to the controller and let the controller decide what to do.

For instance

if ($request->has(''delete))
{
    // Perform delete

    return $results;
}

//Perform send

return $results;

28 Mar
2 months ago

Thavarshan left a reply on Laravel 5.8 Phpunit Command Issues

@MIKAIL10000000 - Happens to all of us bud.

Thavarshan left a reply on Laravel 5.8 Phpunit Command Issues

There is no new way. I suggest you delete the vendor directory and run ~~~composer install && composer update~~~ again.

Thavarshan left a reply on Checkbox In Laravel

You can do multiple submit with buttons but I don't think you can do the same for check boxes. What you can do instead is let the controller method try and sort this out for you.

21 Feb
3 months ago

Thavarshan left a reply on NGINX Configuration File For Non-Laravel Projects

@MIDWESTDEV - Can you recommend me some tutorials about this please. Having a hard time finding them cause I don't know what to search.

Thavarshan started a new conversation NGINX Configuration File For Non-Laravel Projects

I'm working on a non-laravel project (Building my own custom PHP framework). I'm following another Github repo for this and the repo consists of a nginx-configuration.txt file. I'm running Laravel Valet and since I'm still learning I'm not quite sure where and how and where to add the NGINX config file.

This would be the nginx-configuration.txt file. I have.


# nginx configuration to remove the question mark from the URL but maintain the query string

location / { 
    if (!-f $request_filename){
        set $rule_0 1$rule_0;
    }   
    if (!-d $request_filename){
        set $rule_0 2$rule_0;
    }
    if ($rule_0 = "21"){
        rewrite ^/(.*)$ /index.php? last;
    }   
}

12 Jan
5 months ago

Thavarshan left a reply on Sublime Text 3 Package Control Server Offline

@D9705996 - Unrelated to this issue, Thanks for replying.

Thavarshan started a new conversation Sublime Text 3 Package Control Server Offline

Everytime I try to install a new package I get

"There are no packages available for installation"

When I check in the console I get

Package Control: Error downloading channel. HTTP error 404 downloading https://packagecontrol.io/channel_v3.json.

Any one else getting this too?

01 Jan
5 months ago

Thavarshan left a reply on Brew Install PHP 7.2 Instead Of 7.3

@THEMORGZ - Also, Your answer deserves a "Best Answer" vote.

Thavarshan left a reply on Brew Install PHP 7.2 Instead Of 7.3

@THEMORGZ - Hi there!,

Could you please show me what output you get when you run

php --version
31 Dec
5 months ago

Thavarshan left a reply on Brew Install PHP 7.2 Instead Of 7.3

Nothing I've tried seems to work

Thavarshan left a reply on Brew Install PHP 7.2 Instead Of 7.3

@REALRANDYALLEN - Error: No such keg: /usr/local/Cellar/php

Thavarshan left a reply on Brew Install PHP 7.2 Instead Of 7.3

Is it weird that after I get the error every time I check the database through Sequel Pro, Sequel Pro crashes?

Thavarshan left a reply on Brew Install PHP 7.2 Instead Of 7.3

@REGAL2157 - I've already done that without any luck.

Thavarshan left a reply on Brew Install PHP 7.2 Instead Of 7.3

I guess I'll wait till Valet is updated or something.

Thavarshan left a reply on Brew Install PHP 7.2 Instead Of 7.3

@realrandyallen I dont get it. Do you get this error? ErrorException: preg_match(): JIT compilation failed: no more memory

Thavarshan left a reply on Brew Install PHP 7.2 Instead Of 7.3

@REALRANDYALLEN - I get this "Unable to determine linked PHP".

Thavarshan left a reply on Brew Install PHP 7.2 Instead Of 7.3

I'm sort of at a loss. Laravel Valet always returns "ErrorException: preg_match(): JIT compilation failed: no more memory" everytime a database query has to be made. Nothing I've done seems to fix it.

I've tried reinstalling the whole thing multiple times with no luck.

Thavarshan left a reply on Brew Install PHP 7.2 Instead Of 7.3

@REALRANDYALLEN - Yeah but I sort of need to run brew install PHP for Laravel Valet you see and PHP 7.3 is problematic

Thavarshan started a new conversation Brew Install PHP 7.2 Instead Of 7.3

Is there any way to install php 7.2 instead of installing php 7.3 when running brew install php?

25 Dec
5 months ago

Thavarshan left a reply on Laravel Valet Always Returns "ErrorException: Preg_match(): JIT Compilation Failed: No More Memory"

@D9705996 - So I completely remove 7.3 and guess what?

"preg_match(): JIT compilation failed: no more memory"

Thavarshan started a new conversation Laravel Valet Always Returns "ErrorException: Preg_match(): JIT Compilation Failed: No More Memory"

A fresh install of Mac OS and Laravel valet didn't help get rid of the problem. I dug deeper and edited the php.ini files of both PHP 7.2 and 7.3.

edit made on both files was "pecr.jit=1 to pecr.jit=0"

19 Dec
5 months ago

Thavarshan started a new conversation Defining Gloabal Variables Through Helper Function Files

Instead of sharing data with all views through the AppServiceProvider is it advisable to register a helper file in composer.json and load global variable to all views through helper functions?

For instance: I need to load a list categories to all my views. But when I load it through my AppServiceProvider and I don't have a database yet I receive an error instead of the view loading up normally and display a message saying "No categories found".

This is to avoid getting an ugly error basically.

13 Dec
6 months ago

Thavarshan left a reply on How Inportant Is Xcode For Us As PHP And Javascript Developers?

@amsaleka I just saw your profile. You should know that this place is for developers to share knowledge and experience. Not to advertise about some other site. I humbly ask that you respect the code of conduct here.

Thavarshan left a reply on How Inportant Is Xcode For Us As PHP And Javascript Developers?

@AMSALEKA - I'm sorry but please explain your self before I report you as spam.

Thavarshan left a reply on How Inportant Is Xcode For Us As PHP And Javascript Developers?

@SUSTAINED - So unless you work with compiled native code you won’t need Xcode.

Does Xcode provide any dependencies for mom or composer usage?

If I uninstalled it completely will it effect my development?

Thavarshan started a new conversation How Inportant Is Xcode For Us As PHP And Javascript Developers?

On a scale of 1 to 10, How inportant is Xcode for our Mac dev machines?

05 Dec
6 months ago

Thavarshan left a reply on Products And Product Attributes Relationship Best Practices

@VAJID - Thanks! I'll try your method as well. No harm in using both.

04 Dec
6 months ago

Thavarshan left a reply on Products And Product Attributes Relationship Best Practices

@REALRANDYALLEN - I agree. Your approach is more readable like. I mean you just simply understand what’s going on.

Thavarshan left a reply on Products And Product Attributes Relationship Best Practices

@VAJID - Can you explain it a bit more in detail please.

Thavarshan started a new conversation Products And Product Attributes Relationship Best Practices

What would be the best way to make a relationship between products and it's attributes?

The one I came up with was Than a "single" product has "many" attributes and a "single" attribute has "many" data.

e.x. T-Shirt has color and size. Same T-Shirt has the attribute data of red and blue in the color attribute.

Is there a better way to do this instead of using dedicated models and migrations?