siangboon

siangboon

Developer at Kuala Lumpur, Malaysia

Member Since 3 Years Ago

Kuala Lumpur

Experience Points
182,460
Total
Experience

2,540 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
1370
Lessons
Completed
Best Reply Awards
60
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 37
182,460 XP
Jan
21
6 days ago
Activity icon

Replied to Register User

check what "object" that have the "header" property, the object is missing or getting no result...

Jan
18
1 week ago
Activity icon

Replied to How Can I Set The Default Value?

Tray2 is showing his own code for your reference... just add if code to check the condition which item to set as default, then echo 'selected' in the option tag...

Jan
16
1 week ago
Activity icon

Awarded Best Reply on Upgrade Laravel Project 5.6 To 6.x

The upgrade process require to go through a series of checking, reconfiguration/modification on what that impact your existing system, the chances of mistake for upgrading from 5.6 to 6.0 is much higher than you upgrade version by version, to play safe, i would go version by version instead of jump version unless you are very confident...

https://laracasts.com/series/lets-build-a-forum-with-laravel/episodes/88

Jan
15
1 week ago
Activity icon

Commented on Building Data-Tables With Livewire

Let say I have 100 of records, and the default $perPage value is 10, so when it first loaded, it show the 10 pages in the pagination links.

When I clicked on the page "9", and then change the $perPage to 20, the pagination pages became 5, but the table will show empty record and the pagination firstItem() and lastItem() became null, only the total() still remain the same value... in this case, how should i render it properly ?

Jan
14
1 week ago
Activity icon

Replied to Laravel Project - Php Mcrypt Extention Required

i had setup a Laravel 5.5 project with php 7.0 last 2 days, and hitting similar compatibility issue, i think it is similar to yours although the error is different....

This thread help to solve my issue:

https://stackoverflow.com/questions/48787078/laravel-5-parse-error-syntax-error-unexpected-expecting-variable-t-var

If your server doesn't have php 7.1 and above and you are only restricted to use php7.0 do as below:

Delete vendor folder Delete composer.lock file Add this to composer.json file under config c> "platform": { "php": "7.0.0" } As well, ensure PHP version under require is set to 7.0.0 as shown below in config.platform.php:

"config": { "platform": { "php": "7.0.0" } } Run composer install using CMD This now will make sure that only dependencies compatible with php7.0 are installed.

perhaps you can change the version number and give a try.

Jan
13
2 weeks ago
Activity icon

Replied to Upgrade Laravel Project 5.6 To 6.x

The upgrade process require to go through a series of checking, reconfiguration/modification on what that impact your existing system, the chances of mistake for upgrading from 5.6 to 6.0 is much higher than you upgrade version by version, to play safe, i would go version by version instead of jump version unless you are very confident...

https://laracasts.com/series/lets-build-a-forum-with-laravel/episodes/88

Activity icon

Replied to Laravel Project - Php Mcrypt Extention Required

"php": ">=5.4.0",

"laravel/framework": "4.2.x",

the composer.json show that your Larvel version is very old... you can run php 7.2 but the chance you hit error is very high, "mcrypt" is the example, as it's deprecated and removed from version 7.2 onward...

this is my third time to suggest to use php 5.4 and that's. All the Best!

Activity icon

Replied to Laravel Project - Php Mcrypt Extention Required

Please do not upload file that require others to download... i'm very hesitate to download file just to answer question, i think others may think so also...

my suggestion is, download and use php version 5.4 and run the full path command instead of just php inside your project folder

c:\php5\php artisan serve

where "c:\php5\php" is the full path of php 5.4 version


{
    "license": "MIT",

    "require": {
        "php": ">=5.4.0",
        "laravel/framework": "4.2.x",
        "d11wtq/boris": "1.0.8",
        "barryvdh/laravel-debugbar": "1.*@dev",
        "barryvdh/laravel-twigbridge": "0.3.*",
        "barryvdh/laravel-elfinder": "*",
        "barryvdh/laravel-httpcache": "*",
        "barryvdh/laravel-ide-helper": "~1.8",
        "barryvdh/laravel-translation-manager": "[email protected]",
        "barryvdh/laravel-vendor-cleanup": "*",
        "phpoffice/phpword": "dev-master",
        "knplabs/knp-snappy": "[email protected]",
        "barryvdh/laravel-snappy": "[email protected]",
        "anahkiasen/former": "[email protected]",
        "league/stack-robots": "~1.1",
        "guzzlehttp/guzzle": "^6.0.0",
        "rhumsaa/uuid": "~2.8",
        "doctrine/dbal": "~2.4",
        "league/flysystem": "~1.0",
        "league/fractal": "0.12.*",
        "picqer/exact-php-client": "^3.0.0",
        "barryvdh/laravel-async-queue": "^0.3.0",
        "league/flysystem-aws-s3-v3": "^1.0",
        "eluceo/ical": "^0.9.0",
        "fruitcakestudio/laravel-recaptcha": "^0.1.0",
        "fabpot/goutte": "^3.1",
        "fruitcakestudio/omnipay-sisow": "~2.0",
        "league/glide": "^1.2",
        "omnipay/mollie": "^3.2",
        "mollie/mollie-api-php": "^2.0",
        "intervention/validation": "^1.2",
        "phpoffice/phpspreadsheet": "^1.2",
        "geocoder-php/common-http": "^4.2",
        "php-http/guzzle6-adapter": "^2.0",
        "swisnl/geocoder-php-nationaal-georegister-provider": "^1.2",
        "php-http/curl-client": "^2.0",
        "guzzlehttp/psr7": "^1.6",
        "php-http/discovery": "^1.7",
        "php-http/message": "^1.7",
        "psr/http-factory": "^1.0",
        "http-interop/http-factory-guzzle": "^1.0"
    },
    "autoload": {
        "classmap": [
            "app/commands",
            "app/controllers",
            "app/exceptions",
            "app/models",
            "app/interfaces",
            "app/libraries",
            "app/database/migrations",
            "app/database/seeds",
            "app/strategies",
            "app/jobs"
        ],
        "psr-0": {
            "": ["app/src",  "app/libraries", "app/observers", "app/transformers"]
        }
    },
    "scripts": {
        "post-install-cmd": [
            "php artisan vendor-cleanup",
            "php artisan optimize"
        ],
        "post-update-cmd": [
            "php artisan vendor-cleanup",
            "php artisan clear-compiled",
            "php artisan ide-helper:generate",
            "php artisan ide-helper:meta",
            "php artisan elfinder:publish",
            "php artisan optimize"
        ],
        "post-create-project-cmd": [
            "php artisan key:generate"
        ]
    },
    "config": {
        "preferred-install": "dist",
        
    "github-oauth": {
            "github.com": "ea65b078d98a2a459569bdfa242ddf2c3841d9a6"
        }
    },
    "minimum-stability": "stable"
}
Activity icon

Replied to Update Value Inside Delete Method

it's just and example...

you can read the documentation or search some lessons from Laracasts:

https://laravel.com/docs/6.x/scheduling

https://laracasts.com/series/intermediate-laravel/episodes/1

Activity icon

Replied to Update Value Inside Delete Method

You should answer yourself, how the system know when to delete if you do not give a instruction (trigger delete button)? Even with AI, system also need some sort of formulas or algorithms to make the such decision, further more this is destructive action.

If schedule is what you need then just go ahead to create the task and schedule it..

Activity icon

Replied to Combine Data From Multiple Models

nothing wrong to call the role or other model/function in any controller also...

i didn't use Spatie, but i believe the model_has_role table is just a pivot table to store the model and role relationship if not mistaken, and fykzero meant since you already setup the relationship, you should be able call the child object (role) properties from the parent (User) as well... perhaps you give it a try first and feedback the error if any...

Activity icon

Replied to Laravel Project - Php Mcrypt Extention Required

you can upload to any free image hosting online, such as https://imgbb.com/...

copy paste the composer.json may help also.

Activity icon

Replied to Update Value Inside Delete Method

HTTP methods are just for system to identify and route to the correct controller as the developer pre-assigned, to the system, all controllers are equally function as a workplace for executing single or series of actions as you defined.

Activity icon

Replied to PHP Version

I suppose to copy and paste the link or answer directly, but i would share with you and the others, the way i check the supported version, so all can save their time waiting for answer and save others time to read these kind of questions again and again:

  1. Go to https://www.laravel.com official website and then click on the Documentation link
  2. On the top riight corner, select the major version you referring
  3. Scroll down to the "Server Requirements" section, you should see the requirement details.
Jan
11
2 weeks ago
Activity icon

Replied to Combine Data From Multiple Models

i can't catch you. how you define show data from multiple controller in a singler view???

in normal practice, one request is redirect to one controller or view, and we get the data from controller and then show it in view....

probably you explain more or show your code for others to look into in and help...

Activity icon

Awarded Best Reply on I Want To Display Laravel User Name In The View

this is the most basic stuff in Laravel, it's not a good idea to give you answer here or to show the code here it won't help, it's better either go through the laravel from scratch free course or read the documentation https://laravel.com/docs/6.x/views to learn the fundamental before you start a project.

Jan
10
2 weeks ago
Activity icon

Replied to No Query Results For Model [App\Posts] Error

Is your first line Posts::where(...) typo error? the model is App\Post or App\Posts???

Activity icon

Replied to Laravel Project - Php Mcrypt Extention Required

run php -m to check whether the mcrypt is install.

show more information (screenshot the error) or the version in used may help others to understand more...

php -v

and

php artisan -V
Activity icon

Replied to Installation Issues When Moving From One Computer To Another

if it's version 6, try run this

composer require laravel/helpers

screenshot your composer.json and also check your php version...

Activity icon

Replied to Installation Issues When Moving From One Computer To Another

can try the composer install... but before that double check the supported PHP version is installed and in used for the project... different version laravel have different server requirements...

Activity icon

Replied to Hello I Am Getting Below Error On My Local System Laravel Setup.

describe what you trying to do or how you get the error and what the expect result and provide some screenshot or code will help others to understand your question more... simply throw a general error message is like throwing your question to dustbin as no one will able to help...

Activity icon

Replied to Laravel Project - Php Mcrypt Extention Required

I do not have mycrypt extension but the command is working fine for me...

I just glance through Laravel documentation page, mycrypt is only listed in version 5.0 server requirement...

https://laravel.com/docs/5.0#server-requirements

i guess you may have multiple php version installed, double check which php version you use or run the php -m to list the modules and check mycrypt is there.

double check the right php version for the right laravel version, and web version and CLI may different also...

if you need to run particular php version different from the version in your existing environment, just include the full path for example c:\php5\php artisan serve

Activity icon

Replied to How To Do Laravel Slug

the title does not related to the question described, hope you can correct it accordingly....

for relationship, watch any learn Laravel from scratch series or read documentation, or this: https://laracasts.com/series/eloquent-relationships

for slug https://laravel.com/docs/6.x/helpers#method-str-slug

install helper in 6.x https://laravel.com/docs/6.x/upgrade#helpers

Jan
09
2 weeks ago
Activity icon

Replied to I Want To Display Laravel User Name In The View

this is the most basic stuff in Laravel, it's not a good idea to give you answer here or to show the code here it won't help, it's better either go through the laravel from scratch free course or read the documentation https://laravel.com/docs/6.x/views to learn the fundamental before you start a project.

Jan
08
2 weeks ago
Activity icon

Replied to Cpanel Upload View Not Found.

really?

it's weird for me as I tested both ".", "/" and "\" also working on my side...

Activity icon

Replied to Fetching Data From A Pivot Table And Link It With A Column Of Another Table

perhaps you may need a hotel_types table with hotel_type_id in your hotels table instead of hotel_types column in hotels table...

Activity icon

Replied to Why Nobody Cares About Developer's Convenience?

if you already "work for a company" meant that you are part of the company, please think from point of your company unless you are leaving very soon (even leaving also it's better don't talk bad thing about your previous company). if the situation is bad then just try your best to turn it to good. this is also the best opportunity to show off your talents since you know it so well, prove to them what are the problems and what are the solutions as well....

All the Best!

Activity icon

Replied to Cpanel Upload View Not Found.

will it be case sensitive issue???

perhaps try to comment out the existing route and write a simple function closure to narrow down the scope of issue...

// Route::get('/', 'Front\[email protected]');

Route::get('/', function () {
    return "testing";
});

Jan
06
3 weeks ago
Activity icon

Replied to Error 404 After Changing Server

if you are using shared hosting you can't as the IP address is shared, different domain names are used to map to the proper path of folder accordingly. But there should not problem if you are using dedicated IP Address, or perhaps just a simple configure will work...

Activity icon

Replied to Can You Recomend Some Ide For Laravel + Vue ?

haha, you put Visual Studio Code as Editor instead of IDE... the VSC development team must be very sad...

Activity icon

Replied to How To Access My Laravel Project With Customized Name

php artisan serve --host=eventcenter

the default port still 8000, you can add --port=8888 to specify the port

in your hosts (i,e: C:\windows\System32\drivers\etc\hosts) file you need to add eventcenter record

127.0.0.1 eventcenter

Jan
04
3 weeks ago
Activity icon

Replied to Different Permissions To Different Users With A Specific Role

you can either choose to have

  • a user1 to have a admin roleA and another user2 to have admin roleB (super admin) which each of them have similar or different set of permission

  • a user have multiple admin roles (assign as many as you like) said role A with a set of permission A and role B with a set of permission B

check out the ACL:

https://laracasts.com/series/whats-new-in-laravel-5-1/episodes/13 https://laracasts.com/series/whats-new-in-laravel-5-1/episodes/14 https://laracasts.com/series/whats-new-in-laravel-5-1/episodes/15 https://laracasts.com/series/whats-new-in-laravel-5-1/episodes/16

Activity icon

Replied to Data In MySQL Database To Hardcode In The Controller.

design, creating database and all the relationship may time consuming, it sound like your boss asking you to work out a quick demo by skipping all these and create whatever variable or data you need within the controller itself, so it save you a lot of time.... provided you are using only single controller otherwise you need to duplicate the data for each controller....

Jan
03
3 weeks ago
Activity icon

Replied to Laravel Eloquent Returns Wrong Data.

i see the date(date) > ? part a bit different i guess, perhaps copy both and run in the mysql...

try


->whereRaw('date > CURDATE()')
Jan
02
3 weeks ago
Activity icon

Replied to How To Display Hyperlink Tag Correctly In A Blade Foreach

if you click on the link i shared, you should see the expected result which is similar as yours, the browser will try their best to handling the nested anchor tags by closing the previous opening anchor tag, i guessed.

Jan
01
3 weeks ago
Activity icon

Replied to Redirect

first you need to have your user, role and permission setup, after all the relationship setup accordingly, then you can create you own policy to control the access.

I think these episodes may help you to understand more:

https://laracasts.com/series/whats-new-in-laravel-5-1/episodes/13 https://laracasts.com/series/whats-new-in-laravel-5-1/episodes/14 https://laracasts.com/series/whats-new-in-laravel-5-1/episodes/15 https://laracasts.com/series/whats-new-in-laravel-5-1/episodes/16

Activity icon

Replied to Unexpected @endforeach In Blade

you need to close the @if, all opening @if or @foreach need to follow with the close @endif or @endforeach in blade

Activity icon

Commented on Simulate An Inbox Using Mailtrap

hahaha, may be this is the shortest episode in Laracasts...

Happy New Year!

Dec
31
3 weeks ago
Activity icon

Replied to Site Also Accessible From /public

there is some purposes to have the public folder, if you setup correctly, you wouldn't access your site url with a /public/ also even without follow the link you gave. anyhow this is your site... comment out the rewritecond and rewriterule should solve your problem i guess...

Activity icon

Replied to Site Also Accessible From /public

subdomain is cheap, why not separate it out....