siangboon

siangboon

Member Since 3 Years Ago

Kuala Lumpur

Developer at Kuala Lumpur, Malaysia

Experience Points 107,200
Experience Level 22

2,800 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 987
Lessons
Completed
Best Reply Awards 11
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.

25 May
12 hours ago

siangboon left a reply on Vue.js Components Inside A FORM Possible?

can consider trigger another form modal...

23 May
2 days ago

siangboon left a reply on How To Call A Class Only Once (global Variable Scope)

create a helper file in you app directory and use composer to autoload the file

https://tutsforweb.com/creating-helpers-laravel/

siangboon left a reply on Serve Multiple Laravel Apps On Localhost With Php Artisan Serve

As wilk_randall mentioned that you can use the parameter --port=<<port_number>> when running php artisan serve, beside you can use --host=<<host_name / host_ip>> as well.

But, if you in machine, you probably may consider Laravel Valet, it is much more easy for you to work on multiple projects.

21 May
4 days ago

siangboon left a reply on ->withDefault(); Belongs To Many - Workaround ?

i think it's only apply to "one" not for "many"...

Default Models The belongsTo, hasOne, hasOneThrough, and morphOne relationships allow you to define a default model that >will be returned if the given relationship is null. This pattern is often referred to as the Null Object pattern and >can help remove conditional checks in your code. In the following example, the user relation will return an >empty App\User model if no user is attached to the post:

13 May
1 week ago

siangboon left a reply on How To Store Upload An Image?

seem like he just want people to help him code but never try and understanding the code....

01 May
3 weeks ago

siangboon left a reply on How To Change The Login Functionality To Pass A Variable With The Login

It may be better to let the logincontroller just to handle the login logic, all your user preferences can load after this as it will redirect to the $redirectTo path where there should have it's own controller to handle, by default homecontroller is the one so you can just load your value there. in additional you can use middleware, or use the view composer if you need to load and share the variables globally.

by the way, as far as i know there is no way to delete thread, just mark it as close by selecting the best answer to your question.

29 Apr
3 weeks ago

siangboon left a reply on Multiple Logins

in a nutshell, it's just a login, what make them different is the role/permission as sergiu17 said. Search for "ACL" or "role" lessons from Laracasts it will help you understand more.

siangboon left a reply on [CKEDITOR] Error Code: Cloudservices-no-token-url.

this error is quite obvious as the message already stated clear, cloudServices_tokenUrl configuration variable for the CKEditor Cloud Services plugin was not specified. Most likely you are using some cloud services from ckeditor such as easy image... those are paid services.

28 Apr
3 weeks ago

siangboon left a reply on How To Retrieve Two Data

append a "s" at the questionAnswer function name in your user.php

siangboon left a reply on How To Retrieve Two Data

@AISHAHYAACOB - base on the image, your error is at questionAnswers() but in the user.php you given there only have questionAnswer function defined.

siangboon left a reply on Using Logic In Controllers

there is no right or wrong as long as you can get your results you want, but you may need to start consider about the re-usability and maintainability to make your work better, for example, the time format can reactor into a helper function so you can use it any where you want without rewrite the code repeatedly, and the long user query may refactor into scope filter or method.

siangboon left a reply on How To Retrieve Two Data

@AISHAHYAACOB - you should stated down what is the error.

siangboon left a reply on MethodNotAllowedHttpException With Laravel5.4 When Uploading Files Bigger Than 1MB Online, But It Works Perfectly On Localhost

@WBF - I think you should leave some brief summary what the root problem and what fix it so order will learn and fix it if similar problem happened.

siangboon left a reply on Sending String Parameter From Route To View

yes, view composer seem the better option for your need.

26 Apr
4 weeks ago

siangboon left a reply on Setting Headers In Middleware

the reference seem ok for me.

Did you register your middleware and apply it accordingly?

siangboon left a reply on Sending String Parameter From Route To View

reactor it into user method or scope.

siangboon left a reply on GoDaddy Blocked My Domain, How To Unblock?

yes, contact their technical support is the best way for you since you said they blocked your domain.

24 Apr
1 month ago

siangboon left a reply on Best Way To Tackle This App? Ideas Welcome

there are number of lessons related to your topic available here, just search for ACL or role, i think by understand that you may have more clear idea what and how to do....

22 Apr
1 month ago
21 Apr
1 month ago

siangboon left a reply on Address Already In Use

you could use the netstat command to grep whether the port is in used and used by what service/process. Usually 8000 and above is not for system use hence most likely you have run it multiple times and not close it properly.

Anyhow, you may just ignore it and use other port number above 8000 instead

php artisan serve --port=8080
19 Apr
1 month ago

siangboon left a reply on Base Table Or View Not Found

agreed with takdw, check your table name first.

Next time you encounter any same error with SQL command meant it's more related to SQL issue and you may double check the command or try to execute which may easily identify the root cause.

insert into `projects` (`title`, `description`, `updated_at`, `created_at`) values (My first project, Lorem ipsum, 2019-04-19 19:30:35, 2019-04-19 19:30:35)

siangboon left a reply on Laravel Blade, Vue And Authorisation

I think that the actual validation should always done at the back end whereas the vue (or any front end javascripts) is just an plus not only an additional check but also very useful for user experience.

18 Apr
1 month ago

siangboon left a reply on Cloning My Project , NPM Is Not Rendering All The Js Code Properly

@MURILO - it sound that there may some compatibility issues with the dependencies, you may need to double check the package.json next time you "clone" the project again.

siangboon left a reply on How To Save Upload Image To Directory In Laravel 5.8

why not just extract the request() data inside the controller and probably have a method to format accordingly to whatever you like instead of json_encode the request() directly.

siangboon left a reply on Npm Is Not Recognized As An Internal And External Command

@lestah please mark those reply which solve your issue as the answer, or reply the solution you did, with proper guideline if possible so other can learn from it.

siangboon left a reply on Laravel Upgrade To 5.8 Error

you may consider docker if you often work in multi version or different environment ...

siangboon left a reply on Where Are You All From?

Kuala Lumpur, Malaysia

siangboon left a reply on Cloning My Project , NPM Is Not Rendering All The Js Code Properly

@MUNAZZIL - We are not trying to insult you or any instead we just hope that you can learn from mistakes and do not simply give "solutions" that you do not understand what and why you are doing that.

Perhaps 1 person said you did wrong possibility the person may wrong also but more than 5 persons saying the same thing then it's better to take some times to find it out the reason instead of denying.

Allow me to clarify it again, npm is a package manager which use to manage all the javascript packages that you installed into your project, and there are more commands and functions npm can do.

vuejs can consider as one javascript package that mainly for front-end programming and vuejs is just one of the packages that managed by npm.

Error on "npm run dev" may caused by many factors one of the factor may due to some javascript packages problem including vuejs also, but there are much more javascripts had loaded inside laravel project.

Your solution by including the "" into the master layout head section is actually including the vuejs library without installing vuejs into the project through npm way and it will only solve for the case if and only if the issue was due to vuejs.

Hope my explaination help you. All the best!

siangboon left a reply on How To Save Upload Image To Directory In Laravel 5.8

sorry, i don't get you. by the way, did you close your tag properly, the syntax highlight of form code that you shown partially above seem abnormal.

17 Apr
1 month ago

siangboon left a reply on How To Save Upload Image To Directory In Laravel 5.8

did you include

 enctype="multipart/form-data" 

in your form?

siangboon left a reply on Cloning My Project , NPM Is Not Rendering All The Js Code Properly

how you "clone"?? is it copy and paste entire project folder exactly or create a new project "laravel new projectname" then override all the source files?? Bear in mind, in laravel 5.7, "Asset Directory Flattened".

anyway, i'll check the console and inspect one of the problem elements and see did it apply the css accordingly, and find the source of css file to check the css is correct...

if it's just the vue component, you may place a simple example component from the root of the element id till where the problem happen, i experienced that missing a closing tag will caused the following vue component not rendering at all...

siangboon left a reply on Cloning My Project , NPM Is Not Rendering All The Js Code Properly

@WILK_RANDALL - Haha.... @wilk_randall you are so bad, but it's true hahaha....

@munazzil not to offend but honestly to suggest that you really need to understand first why your boss ask you to do that and why with your include "" way will work for your case... or at least find out what is the meaning and purpose of "npm"

I think @jeffreyway should have up/down vote feature like disqus in here...

15 Apr
1 month ago

siangboon left a reply on Laravel View()->share Error

have you tell the provider where to find Category?

use App\Category;

siangboon left a reply on Run Migrations That Are Scattered In Different Folders

i'm not really sure i understand your question right, but from my understanding, database migration have nothing to do with directory path, as it's like one way direction where it only help to create the schema as you defined in the migration file.

siangboon left a reply on Laravel Upgrade To 5.8 Error

there is only 1 version for 1 environment, you may need to run the exact path of your php or follow some workaround here

https://stackoverflow.com/questions/32750250/tell-composer-to-use-different-php-version

siangboon left a reply on I Have Problem With Pdo_sqlite

@THESOGAFOI - PHP CLI is not the same as the PHP Apache module...

https://superuser.com/questions/971867/why-is-the-php-version-different-in-phpinfo-and-cli

create a testing page and run the phpinfo() inside

<?php

phpinfo();

10 Apr
1 month ago

siangboon left a reply on City Based Website

@ZFDEVELOPER - The cookies is not always there, users may new to site, use other device/browser or deleted it from time to time, or the user may want to change the city at any time as well, so you need some way to check it and update if any change...

Anyway, it just my suggestion only you may just do whatever you think is good for you...

09 Apr
1 month ago

siangboon left a reply on I Have Problem With Pdo_sqlite

@THESOGAFOI - Cronix mean the apache not just the cli such as /etc/php/7.2/apache2/php.ini

or run the command to find it using the command

php -i | grep "Loaded Configuration File"
07 Apr
1 month ago

siangboon left a reply on PHPUnit Throws Error But Works When Specifying The Specific Test

Agreed with Talinon, the error is so obvious and the system won't lie. You should double check that very carefully. I suspect that you may defining the test function name as the same test class name.

05 Apr
1 month ago

siangboon left a reply on Setting GetRouteKeyName If A Condition Is Met

@THOASTY - mark it as answer if it help not just like....

03 Apr
1 month ago

siangboon left a reply on Cannot Download Excel File On Production Server But Works On Local

check the log each time you execute it and dd() any expected value or information at any suspicious point before the error...

siangboon left a reply on How To Do Sum In Laravel

To be frank this is the most basic 101 in any programming language.. I strongly encourage you do some study and practice more on your own first. Your time is precious and we too...

https://www.w3schools.com/php/php_operators.asp