siangboon

siangboon

Developer at Kuala Lumpur, Malaysia

Member Since 3 Years Ago

Kuala Lumpur

Experience Points
137,510
Total
Experience

2,490 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
1130
Lessons
Completed
Best Reply Awards
32
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 28
137,510 XP
22 Sep
1 day ago

siangboon left a reply on Helpers

i meant I found that you almost everyday asking few simple questions which can simply find the answer by reading documents and googling, but you seem treat people here are very free and try to get quick answer or being your personal tutors. It's ok to ask and i like your attitude to keep asking when don't know also but don't you think as a developer you should learn how to troubleshoot and finding answer yourself before ask for help... for example, just the reply above, i took a minute or few to find a related lesson and pasted for you but did you watch it before you reply me? Anyway, this is my personal opinion and advice you can simply ignore it.

siangboon left a reply on Laravel.password_resets' Doesn't Exist

check is the database/table name correct or you connecting to the right database; alternative just simply create the table manually, it's just 3 columns...

Schema::create('password_resets', function (Blueprint $table) {
            $table->string('email')->index();
            $table->string('token');
            $table->timestamp('created_at')->nullable();
        });

siangboon left a reply on Helpers

i hope you can take some times to watch or read some material before asking it help you and help others as well.

https://laracasts.com/series/object-oriented-bootcamp-in-php/episodes/7

siangboon left a reply on After Copying A Laravel Project Blade Views Not Reflecting Changes

Rename one of the file name and try to access it, if you did not see the 404, most likely something wrong at your setup, or add a new route to a test blade page. By the way, what had you change that not update? CSS style?

siangboon left a reply on Validation And Duplicate Update() In Laravel

you are confusing us, you were asking about validation issue but now you are showing something not related as no validation in the update method.

anyhow, you could pass the model $voiture instead of $id in the update method and remember to update the web.php parameter as well if you do so.

siangboon left a reply on Undefined Variable In Mail View

your original post with single quote on '$this->user->name' and '$this->user->email' and now you edited and removed it...

siangboon left a reply on Validation And Duplicate Update() In Laravel

should understanding first before you copy and paste....

mabdullahsari meant the 3rd parameter is to pass the id of the model you trying to update, so he just assume $voiture is the model your trying to update... what your need to do is just replacing the $voiture with the correct model.

siangboon left a reply on Undefined Variable In Mail View

return $this->view('emails.newUser')->with([
            'name' => $this->user->name,
            'email' => $this->user->email
        ]);

siangboon left a reply on Middleware

this is used to control only certain users or conditions can update the posts such as only the post owner can update his own post...

21 Sep
2 days ago

siangboon left a reply on Why Image Is Not Showing In Post?

don't always ask for help from others before you self inspecting or try something...

<img src="http://localhost/avatarprogrammer.png">

you knew the value exist and the browser read it, but does the file really exists, the filename correct or exists at the right place?

siangboon left a reply on Getting 401 | Unauthorized After Post Update

you should make the primary key and foreign key column type consistent.

siangboon left a reply on Why Image Is Not Showing In Post?

I meant check the value

is the database value stored correctly?

So, now at least you have some hint where the problem is, ask yourself why no value? then trace back step by step from the blade, to controller/model/database and find where the problem cause it...

siangboon left a reply on Why Image Is Not Showing In Post?

double check the value stored in db and the value rendered in the html, and check whether any error on the console

siangboon left a reply on Getting 401 | Unauthorized After Post Update

is 401 thrown because of this?

if(auth()->user()->id !== $news->user_id){
            abort(401, "Please Login");
        }

have you check the value auth()->user()->id and $news->user_id?

siangboon left a reply on Middleware

'can:update,post'

can -- allow

update -- method name defined in the policy

post -- the post model passed from {post}

the pass condition defined inside the update method it mean return true if the update method condition passed

20 Sep
3 days ago

siangboon left a reply on A User Can Access Home Page Without Authentication

check the HomeController or any controller related and add the except to exclude the authentication checking for the resource you don't need, for example:



public function __construct()
    {
        $this->middleware('auth', ['except' => ['index', 'show']]);
    }

btw, ui:auth is only available on Laravel 6.

19 Sep
4 days ago

siangboon left a reply on All Policies Returns True On One Page Only

why post so many code that seem not related to the problem cause ???

18 Sep
5 days ago

siangboon left a reply on AJAX Code In Laravel Controller

From wikipedia:

Ajax (short for asynchronous JavaScript and XML) is a set of web development techniques using many web technologies on the client side to create asynchronous web applications.

With Ajax, web applications can send and retrieve data from a server asynchronously (in the background) without interfering with the display and behavior of the existing page. By decoupling the data interchange layer from the presentation layer, Ajax allows web pages and, by extension, web applications, to change content dynamically without the need to reload the entire page. In practice, modern implementations commonly utilize JSON instead of XML.

Ajax is not a single technology, but rather a group of technologies. HTML and CSS can be used in combination to mark up and style information. The webpage can then be modified by JavaScript to dynamically displayand allow the user to interact withthe new information. The built-in XMLHttpRequest object, or since 2017 the new "fetch()" function within JavaScript is commonly used to execute Ajax on webpages allowing websites to load content onto the screen without refreshing the page. Ajax is not a new technology, or different language, just existing technologies used in new ways.

17 Sep
6 days ago

siangboon left a reply on Solve Class App\Http\middleware\AdminMiddleware Does Not Exist

no harm to double check the case sensitive while waiting other solutions...

siangboon left a reply on Solve Class App\Http\middleware\AdminMiddleware Does Not Exist

check the typo and also case sensitive...

16 Sep
1 week ago

siangboon left a reply on How To Debug Maximum Execution Time Of 30 Seconds

use telescope.

or write a simple function to log before and after each execution of scheduled task/command.

siangboon left a reply on Laravel How To Disable Login Page Auth::routes(['login' => False]);

if you do not need a login page, most likely you do not need to login mean you do not need to run make:auth and no login page will be added if you had already run make:auth, "Auth::routes();" will be added in to routes/web.php and all the list of authentication routes are declared. Just simply remove this "Auth::routes();" line, all the authentication route will go no where

siangboon left a reply on Javascript/JQuery/Ajax Code In Laravel Controller

No. javascript only rendered and processed at client browser (front end), you can prepare your script in template and load the required script template when the certain condition matched.

14 Sep
1 week ago

siangboon left a reply on Route SLUG On Main Route?

the route sequence does matter, it execute from top to bottom...

hence, laravel will treat articles as {slug} parameter if your Route::get('slug', '[email protected]') is top of Route::get('/articles', '[email protected]'), so just change the sequence will solve.

13 Sep
1 week ago

siangboon left a reply on Translate Database

it'll be more flexible if you separate out the columns of the content that you need to have multi language into another table (i.e. lang_id, body)

siangboon left a reply on Uninstall Laravel From Godaddy.com

if it's purely the laravel and 4 add-on domain, you can leave the addon-domain folders and .htaccess, then simply delete other files/folders.

siangboon left a reply on Unique Slug Duplicate Entry

by adding the slug url with an id of the news at the back i.e localhost:8000/post/welcome-to-my-post-1 if the ID of the post is 1

this should be pretty straight forward, if you can store post's slug as 'welcome-to-my-post' you should be able store post 'welcome-to-my-post-1', please try it out yourself.

siangboon left a reply on Array And Object How To Solve This? Any Help?

if your $Orders->Status is a collection your can append the helper.

->toArray();
12 Sep
1 week ago

siangboon left a reply on Permission Denied Error For Laravel.log

the error is related to permission

failed to open stream: Permission denied in

After installing Laravel, you may need to configure some permissions. Directories within the storage and the bootstrap/cache directories should be writable by your web server or Laravel will not run. If you are using the Homestead virtual machine, these permissions should already be set.

10 Sep
1 week ago

siangboon left a reply on Eloquent Is So Slow ...

indexing of right column also make the big different too..

siangboon left a reply on How To Add Css Inside {{ }}

{{ $event->event }}&nbsp;&nbsp;&nbsp;{{ $event->when }}

siangboon left a reply on How To Add Css Inside {{ }}

{{}} 

is just a blade way of

<?php  echo "" ?> 

You can have any expression or echo whatever you want....

09 Sep
2 weeks ago

siangboon commented on At A Glance

Excellent animation! But for the first time i felt that Jeffrey's voice does not match with the video and I almost did not listen what Jeffery is talking about but only focusing on the animation :laughing:

siangboon left a reply on Laracasts Coupons Codes?

Don't think so. Laracasts is relatively cheap compare to most other online training sites. But from the past experiences, Jeffrey may offer some instant flash sales during the year end or festival season.

08 Sep
2 weeks ago

siangboon left a reply on How To Add Google Map Like This Video Shown

the documentation is the best source you can get... if you need complete code and make it running without putting any effort then just pay for other to do it..

siangboon left a reply on Error 419 When Sending Request From Subdomain To Domain

https://laravel.com/docs/5.8/csrf#csrf-excluding-uris

protected $except = [
        'stripe/*',
        'http://example.com/foo/bar',
        'http://example.com/foo/*',
    ];

siangboon left a reply on Website Based On State, City And Category

it depend on your requirement... most of the MNC global site i observed that they will detect the IP address and ask the user to choose whether to proceed to global site or to their region/country site...

siangboon left a reply on Trying To Get Tags Associated To A Post

First make sure yourself clear on what you are calling, is an object or value. if it's collection of objects then you need to loop each object in order to call the property...

you should ensure the object exist before you can call the property of object....

if($tag) <= if $tag is true you may find the data what if $tag cannot find a record?

how about "else" without declare/assign proper/default $tag object, the tag is empty/null, and you call the $tag->name, hence you get error: "Trying to get property 'name' of NON-OBJECT

06 Sep
2 weeks ago

siangboon left a reply on Trying To Get Tags Associated To A Post

if tags is a collection you may need to loop each tag to get the name property of the tag...

siangboon left a reply on Wink - Where Are The Blade Files?

not using it but after have a glance on the project, all the files should under vendor/writingink/wink and seem using vuejs to load everything...

check out the source code https://github.com/writingink/wink

05 Sep
2 weeks ago

siangboon left a reply on Getting Extra Data From Pivot Table

may be try this

dd($author->books[0]->pivot->get());

siangboon left a reply on VueJS In My Blade Templates ( But Not SPA )

export default {

usually used in vue component file

why not spend some times to watch the free lessons https://laracasts.com/series/learn-vue-2-step-by-step

04 Sep
2 weeks ago

siangboon left a reply on Call To A Member Function Store() On String

check out others blogs or tutorials how to store image... for example.

https://blog.hashvel.com/posts/laravel-image-upload/

03 Sep
2 weeks ago

siangboon left a reply on Multiple View In Once View

you can have either single or multiple controllers or views, it's depend on your personal preference.

Personally, i make user info and profile into separate tab each tab has its own form, so user can save only the tab info instead of combine and submit all inputs at once.

siangboon left a reply on How Can I Avoid To Stop Writting Script In Ckeditor ?

I'm not really clear what is your questions. but {!! $template !!} is the right way to display html content, it should render the html tag accordingly.

01 Sep
3 weeks ago

siangboon left a reply on Sesssion Expiry Without Auth

    /*
    |--------------------------------------------------------------------------
    | Session Lifetime
    |--------------------------------------------------------------------------
    |
    | Here you may specify the number of minutes that you wish the session
    | to be allowed to remain idle before it expires. If you want them
    | to immediately expire on the browser closing, set that option.
    |
    */
31 Aug
3 weeks ago

siangboon left a reply on Best Way To Specify New Items

the best way for other may not the best way for you... just keep trying and fine tune till you and your customer satisfy...

created_at is the best for me as nothing much work to do just limit the number of new items i wish to display if i have all the product update regularly. imagine there are more than 100 of products insert every day, i do not want to unmark all the "not new" items every day. but if you have only few product to insert once a month then should be fine.

siangboon left a reply on Disable Autoplay Feature

hahaha.. possible allow to hide the left menu on large screen also...

siangboon left a reply on Laravel 5.2 To 6

there are too much of steps.... i rather create a new project, copy and paste the code portion by portion... having all unit tests and feature tests ready will be very helpful in this case...