Cyber Monday! Get 25% off for as long as you keep your subscription. New subscribers only.

HubertVanD

HubertVanD

Member Since 6 Months Ago

Experience Points
22,520
Total
Experience

2,480 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
213
Lessons
Completed
Best Reply Awards
0
Best Reply
Awards
  • start your 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-in-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 Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • evangelist 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 5
22,520 XP
Nov
13
2 weeks ago
Activity icon

Replied to Debug Blade Variables During Rendering

Thanx. I could have thought about it myself!

Thnx.

Activity icon

Started a new Conversation Debug Blade Variables During Rendering

My project crashes during rendering of Blade files, most likely due to the value of Blade variables. Is there an easy way to debug this? E.g. by dumping the value of the variables in a way equivalent to dd() or dump() in php?

HUbert

Nov
12
2 weeks ago
Activity icon

Commented on Search Dropdown Autocomplete With Livewire

Many older games in IGDB don't have a complete record: all kinds of keys are missing. I could only fix this with a bunch of isset()'s in formatGameForView and show.blade.php.

Am I the only one with this problem?

Nov
09
3 weeks ago
Activity icon

Replied to Livewire Components Don't Work Asynchronous

Clear. I've managed to set up a virual host in Xampp.

Nov
07
3 weeks ago
Activity icon

Started a new Conversation Livewire Components Don't Work Asynchronous

I'm following the videogame aggregator training currently. U have 4 Livewire components on a page that each make an HTTP-request. This is supposed to happen asynchronously.

But when I put asleep(3) in the first component to make it slower, all other 3 seem to wait for the first to finish. Apparently they are not working asynchronously.

Am I doing something wrong?

Hubert

Nov
06
3 weeks ago
Activity icon

Commented on Improve Performance

When I put the sleep(3) in the first component, all other 3 seem to wait for the first to finish. Apparently they are not working asynchronously.

Am I doing something wrong?

Hubert

Oct
23
1 month ago
Activity icon

Replied to Laracasts.test/api/stats Not Found

Does that mean that I have to create the api-site myself locally?

Activity icon

Started a new Conversation Laracasts.test/api/stats Not Found

I'm currently following the video series about VUE and SPA. In episode seven the use axios calls to a remote api: laracasts.test/api/stats.

I however get the error: net::ERR_NAME_NOT_RESOLVED

It looks like laracast.test doesn't exist?

Or am I doing something wrong?

HUbert

Oct
20
1 month ago
Activity icon

Replied to Npm Error: Failed At The @ Development Script.

Meanwhile I found the error, and it was dumb: the path to tailwind.config.js was wrong!

Thanx anyway.

Activity icon

Started a new Conversation Npm Error: Failed At The @ Development Script.

I am starting a new Laravel project with Vue and Vue-router and Tailwind (the Laravel, Vue, and SPA videos form Laracasts). However I keep getting the npm error written in the title of this discussion.

My webpack.mix.js:

let mix = require('laravel-mix');

const tailwindcss = require('tailwindcss')

mix.js('resources/js/app.js', 'public/js') .sass('resources/sass/app.scss', 'public/css') .options({ processCssUrls: false, postCss: [tailwindcss('./path/to/your/tailwind.config.js')], });

My app.scss:

@import "tailwindcss/base"; @import "tailwindcss/components"; @import "tailwindcss/utilities";

I tried a method described elsewhere in this form: removing node_modules and install npm again. But that didn't help.

Most likely I am making a stupid beginners error, but I can't find it.

Any suggestions?

Hubert

Oct
16
1 month ago
Activity icon

Commented on Refactoring To Custom Validation

In Laravel 7 only the second method works for me. And you have to import App\Rules\SpamFree.

Oct
12
1 month ago
Activity icon

Replied to How To Verify URI In Requests

Found it: A type : Middelware instead of Middleware!!

Thanx.

Hubert

Activity icon

Replied to How To Verify URI In Requests

[2020-10-12 20:24:40] local.ERROR: Method App\Http\Controllers\UserNotificationsController::middelware does not exist. {"exception":"[object] (BadMethodCallException(code: 0): Method App\Http\Controllers\UserNotificationsController::middelware does not exist. at C:\xampp\htdocs\forum-oude pc\vendor\laravel\framework\src\Illuminate\Routing\Controller.php:68) [stacktrace] #0 C:\xampp\htdocs\forum-oude pc\app\Http\Controllers\UserNotificationsController.php(12): Illuminate\Routing\Controller->__call('middelware', Array) #1 [internal function]: App\Http\Controllers\UserNotificationsController->__construct() #2 C:\xampp\htdocs\forum-oude pc\vendor\laravel\framework\src\Illuminate\Container\Container.php(849): ReflectionClass->newInstanceArgs(Array) #3 C:\xampp\htdocs\forum-oude pc\vendor\laravel\framework\src\Illuminate\Container\Container.php(691): Illuminate\Container\Container->build('App\\Http\\Contro...') #4 C:\xampp\htdocs\forum-oude pc\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(796): Illuminate\Container\Container->resolve('App\\Http\\Contro...', Array, true) #5 C:\xampp\htdocs\forum-oude pc\vendor\laravel\framework\src\Illuminate\Container\Container.php(637): Illuminate\Foundation\Application->resolve('App\\Http\\Contro...', Array) #6 C:\xampp\htdocs\forum-oude pc\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(781): Illuminate\Container\Container->make('App\\Http\\Contro...', Array) #7 C:\xampp\htdocs\forum-oude pc\vendor\laravel\framework\src\Illuminate\Routing\Route.php(253): Illuminate\Foundation\Application->make('App\\Http\\Contro...') #8 C:\xampp\htdocs\forum-oude pc\vendor\laravel\framework\src\Illuminate\Routing\Route.php(970): Illuminate\Routing\Route->getController() #9 C:\xampp\htdocs\forum-oude pc\vendor\laravel\framework\src\Illuminate\Routing\Route.php(931): Illuminate\Routing\Route->controllerMiddleware() #10 C:\xampp\htdocs\forum-oude pc\vendor\laravel\framework\src\Illuminate\Routing\Router.php(702): Illuminate\Routing\Route->gatherMiddleware() #11 C:\xampp\htdocs\forum-oude pc\vendor\laravel\framework\src\Illuminate\Routing\Router.php(678): Illuminate\Routing\Router->gatherRouteMiddleware(Object(Illuminate\Routing\Route)) #12 C:\xampp\htdocs\forum-oude pc\vendor\laravel\framework\src\Illuminate\Routing\Router.php(662): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request)) #13 C:\xampp\htdocs\forum-oude pc\vendor\laravel\framework\src\Illuminate\Routing\Router.php(628): Illuminate\Routing\Router->runRoute(Object(Illuminate\Http\Request), Object(Illuminate\Routing\Route)) #14 C:\xampp\htdocs\forum-oude pc\vendor\laravel\framework\src\Illuminate\Routing\Router.php(617): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request)) #15 C:\xampp\htdocs\forum-oude pc\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(165): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request)) #16 C:\xampp\htdocs\forum-oude pc\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(128): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request)) #17 C:\xampp\htdocs\forum-oude pc\vendor\barryvdh\laravel-debugbar\src\Middleware\InjectDebugbar.php(58): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #18 C:\xampp\htdocs\forum-oude pc\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): Barryvdh\Debugbar\Middleware\InjectDebugbar->handle(Object(Illuminate\Http\Request), Object(Closure)) #19 C:\xampp\htdocs\forum-oude pc\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #20 C:\xampp\htdocs\forum-oude pc\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle(Object(Illuminate\Http\Request), Object(Closure)) #21 C:\xampp\htdocs\forum-oude pc\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #22 C:\xampp\htdocs\forum-oude pc\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle(Object(Illuminate\Http\Request), Object(Closure)) #23 C:\xampp\htdocs\forum-oude pc\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\ValidatePostSize.php(27): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #24 C:\xampp\htdocs\forum-oude pc\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): Illuminate\Foundation\Http\Middleware\ValidatePostSize->handle(Object(Illuminate\Http\Request), Object(Closure)) #25 C:\xampp\htdocs\forum-oude pc\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode.php(63): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #26 C:\xampp\htdocs\forum-oude pc\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure)) #27 C:\xampp\htdocs\forum-oude pc\vendor\fruitcake\laravel-cors\src\HandleCors.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #28 C:\xampp\htdocs\forum-oude pc\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): Fruitcake\Cors\HandleCors->handle(Object(Illuminate\Http\Request), Object(Closure)) #29 C:\xampp\htdocs\forum-oude pc\vendor\fideloper\proxy\src\TrustProxies.php(57): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #30 C:\xampp\htdocs\forum-oude pc\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): Fideloper\Proxy\TrustProxies->handle(Object(Illuminate\Http\Request), Object(Closure)) #31 C:\xampp\htdocs\forum-oude pc\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #32 C:\xampp\htdocs\forum-oude pc\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(140): Illuminate\Pipeline\Pipeline->then(Object(Closure)) #33 C:\xampp\htdocs\forum-oude pc\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(109): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request)) #34 C:\xampp\htdocs\forum-oude pc\public\index.php(55): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request)) #35 {main} "}

Activity icon

Started a new Conversation How To Verify URI In Requests

I'm following the Forum-videos. In video 44 I am running into a problem that I am unable to solve:

In a test I make a getJson request:

    $this->assertCount(
        1,
        $this->getJson("/profiles/" . auth()->user()->name . "/notifications")->json()
    );

In web.php I have the route:

Route::get('/profiles/{user}/notifications', '[email protected]');

phpunit gives green light, but the index method in the controller is never called. Also later, when I use an axios call from a Vue component to the same route, I get a 500 error.

Most likely it is a stupid error I am making somewhere.

Is there a way to show the request that is received by the backend and that is used to select the right route in web.php? At least I an then check whether the right URI is coming in.

Kind regards,

Hubert

Sep
23
2 months ago
Activity icon

Commented on Object-Oriented Forms: Part 1

Spend hours to find this bug. Thanx.

Aug
30
3 months ago
Activity icon

Replied to Problem With Awesome Font

Ik heb de zaak inmiddels opgelost na een tip van iemand op stack-overflow:

Gewoon in de header van mijn layout blade file de regel link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.13.0/css/all.css" toevoegen.

Activity icon

Replied to Problem With Awesome Font

Version: where can I find that? I just installed last week, so I assume it is the latest version.

I am using only fa-heart and fa-copy. These are icons?

Aug
29
3 months ago
Activity icon

Replied to Problem With Awesome Font

Thnx for the quick reply.

I followed your instructions. Howver, I still get dummy icons: when using i get a kind of rectangle with F0C5 in it.

when using i get a kind of rectangle with F004 in it. Hubert

Activity icon

Started a new Conversation Problem With Awesome Font

I am trying to user an icon from Font Awesome in a Laravel project. I installed the font: npm install font-awesome --save Add to resources/sass/app.scss the line: @import "node_modules/font-awesome/scss/font-awesome.scss"; npm run dev

And on my page I used the font like: .

But the result is that only a kind of dummy icon (a kind of rectangle) is visible. I looked for solutions in stack-overflo and was give een reference to : https://stackoverflow.com/questions/43451509/how-to-install-font-awesome-in-laravel-mix.

The worrying thing is that many different solutions are given! I treid a few of them but nothing works.

I cannot understand it can be so hard to use the most used Icon font in teh most used php framwork!!

WHo can help. A emore detailled descriptiuon of my problem you can find here: https://stackoverflow.com/questions/63640648/awesome-font-icons-do-not-show-with-laravel-7.

Hubert

Aug
25
3 months ago
Activity icon

Replied to 405 Method Not Allowed With Axios

I found the problem and a workaround:

When a make a request from a form, I always have to use {{url(....)}} to get the url right. E.g. '/threads' should be changed to '{{url("/hreads')}}'.

When I (manually) replace the url in the axios.patch from '/replies/260' into 'http://localhost/public/replies/260' then I get a 200, as should be.

Can I use the url-function in the vue, sothat I always get ther right url in my request?

Hubert

Activity icon

Replied to 405 Method Not Allowed With Axios

General: Request URL: http://localhost/replies/260 Request Method: PATCH Status Code: 405 Method Not Allowed Remote Address: [::1]:80 Referrer Policy: no-referrer-when-downgrade

Response: HTTP/1.1 405 Method Not Allowed Date: Tue, 25 Aug 2020 18:24:59 GMT Server: Apache/2.4.38 (Win32) OpenSSL/1.1.1a PHP/7.3.2 Vary: accept-language,accept-charset Accept-Ranges: bytes Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/html; charset=utf-8 Content-Language: en

Request: PATCH /replies/260 HTTP/1.1 Host: localhost Connection: keep-alive Content-Length: 31 Pragma: no-cache Cache-Control: no-cache Accept: application/json, text/plain, / X-XSRF-TOKEN: eyJpdiI6InVvYjVnK2FUYXBsUEg5cnZZcUV5MFE9PSIsInZhbHVlIjoiM2pUM1I0RGVhbisyZkpOZDhFdURWN0pnWHNIcGxFUlBrVEVmekVzMVYyQld6V0JxZExXTVZOQ1JWdzdTOTZPVm1PRHgvUWNHS0k2NXR6YWVOWGNmaFlrb2phaTAwYjByOTdHdjR2SEdDbmVuK2ErK1FNSXgxemx1TUcvdGxTcWQiLCJtYWMiOiIxNDMzMGQ3NTliZTI3ZGQxYTE1ZTFkZTZjYTQ0NWYwYjEzZjdkNzZiNTQ1ZmVlODY4YjBlNTM3ZjM5ODRjNDNlIn0= X-Requested-With: XMLHttpRequest User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36 Content-Type: application/json;charset=UTF-8 Origin: http://localhost Sec-Fetch-Site: same-origin Sec-Fetch-Mode: cors Sec-Fetch-Dest: empty Referer: http://localhost/forum/public/threads/eveniet/68 Accept-Encoding: gzip, deflate, br Accept-Language: en-GB,en;q=0.9,en-US;q=0.8,nl;q=0.7,de-DE;q=0.6,de;q=0.5 Cookie: _ga=GA1.1.396230672.1518958878; hikashop_cart_id=4499; hikashop_cart_session_id=ipi7c560kkfcm5qbvu6nj54690; XSRF-TOKEN=eyJpdiI6InVvYjVnK2FUYXBsUEg5cnZZcUV5MFE9PSIsInZhbHVlIjoiM2pUM1I0RGVhbisyZkpOZDhFdURWN0pnWHNIcGxFUlBrVEVmekVzMVYyQld6V0JxZExXTVZOQ1JWdzdTOTZPVm1PRHgvUWNHS0k2NXR6YWVOWGNmaFlrb2phaTAwYjByOTdHdjR2SEdDbmVuK2ErK1FNSXgxemx1TUcvdGxTcWQiLCJtYWMiOiIxNDMzMGQ3NTliZTI3ZGQxYTE1ZTFkZTZjYTQ0NWYwYjEzZjdkNzZiNTQ1ZmVlODY4YjBlNTM3ZjM5ODRjNDNlIn0%3D; forum_session=eyJpdiI6InpHNlFTa2pES1kzRU8zVEYzWFRMRUE9PSIsInZhbHVlIjoiOERnMW5RdENRcEZ0T213MGI0ZmltNk5OYlBoTWljcmMweEptZ01ndm5ycExPM1VnUkNRRnRBNWp0M1ZwSlFjaWhGNXcvNUtpU3E2bTR1MytDUFNXNlc1K0RKSUJDMFV1VW5zY2xrOUJrUXBVU1hiMGFqa291SzdqR1MvajVyd04iLCJtYWMiOiJiZDk5YTMyOTgyNTg1MTU3YzQ3MTJjZjU4YjUxMzVlMWE0Y2U2ZGUyYTlkYjMyNDM1ZTdjMjZhOTY2YmFhY2NlIn0%3D {body: "ouyiouiooiuouyoyuouo"} body: "ouyiouiooiuouyoyuouo"

Aug
24
3 months ago
Activity icon

Replied to 405 Method Not Allowed With Axios

Thnx for your quick reply. The relevant information (I think):

In Reply.vue:

export default { props: ['attributes'], data() { return { editing: false, body: this.attributes.body }; }, methods: { update() { axios.patch('/replies/' + this.attributes.id, { body: this.body }); this.editing = false; flash('Updated!'); } } }

In web.php:

Route::patch('/replies/{reply}', '[email protected]');

In RepliesController:

public function update(Reply $reply)
{
    $this->authorize('update', $reply);
    $reply->update(['body' => request('body')]);
}

HUbert

Activity icon

Started a new Conversation 405 Method Not Allowed With Axios

I'm following the laracast on building a forum. Am currently in episode 32. I am using Laravel 7.

When I do everything as explained, and edit a reply, and then push the "update" button, I get the wrong message form the Chrome network inspector: "405 method not allowed".

Any suggestion what I am doing wrong?

Hubert

Jun
12
5 months ago
Activity icon

Replied to Public Function Scope Issue

I found the problem:

I accidently copied the scopeWithLikes function also to the Tweet-class!

Problem solved.

Hubert

Activity icon

Replied to Public Function Scope Issue

I am now using App\Tweet::withLikes()->first();

But now I am getting the error: TypeError: Argument 1 passed to App/Tweet::scopeWithLikes() must be an instance of App/Builder, instance of Illuminate/Database/Eloquent/Builder given, called in c:/xampp/htdocs/tweety/vendor/laravel/framework/src/Illiminate/Databe/Eloquent/Model.php on line 1164.

Jun
11
5 months ago
Activity icon

Started a new Conversation Public Function Scope Issue

I'm learning laravel by following the Laracast "Laravel from scratch". I run into a problem in episode 67:

Around 20:40 a public function scopeWithLikes(...) is defined in a trait in the Tweet model. At 21:00 this function is called (in Tinker) as Tweet::withLikes->first(). Some tweets are supposed to be returned.

In my case I get the message:"PHP fatal error: Class constant 'App/Tweet::withLikes' not found in Psy Shell code on line 1".

What is going wrong? According to the vedeo the function defined as scopWithLikes can be called as ::withLikes. But I can nowhere find documetnation about this.

Can someone help?

Hubert