Our Black Friday sale is now live! All individual subscriptions are 50% OFF. This week only!

Hilbert

Hilbert

Member Since 11 Months Ago

Experience Points
6,990
Total
Experience

3,010 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
64
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 2
6,990 XP
Oct
16
1 month ago
Activity icon

Replied to Laravel 8 Jetstream - Vue Error

But there is only an auth check, I don't have a different level of users. These are the routes

Route::redirect('/','/login');

Route::group(['auth'], function () { Route::get('/dashboard',[HomeController::class,'index'])->name('dashboard'); Route::resource('leads',LeadController::class); Route::post('leads/save',[LeadController::class,'save']); });

Activity icon

Replied to Laravel 8 Jetstream - Vue Error

Got it,

app.js:29535 [Vue warn]: Error in render: "TypeError: Cannot read property 'profile_photo_url' of null"

found in

---> at resources/js/Layouts/AppLayout.vue at resources/js/Pages/Dashboard.vue warn @ app.js:29535 app.js:30798 TypeError: Cannot read property 'profile_photo_url' of null at Proxy.render (app.js:26160) at VueComponent.Vue._render (app.js:32452) at VueComponent.updateComponent (app.js:32968) at Watcher.get (app.js:33379) at new Watcher (app.js:33368) at mountComponent (app.js:32975) at VueComponent../node_modules/vue/dist/vue.common.dev.js.Vue.$mount (app.js:37945) at VueComponent../node_modules/vue/dist/vue.common.dev.js.Vue.$mount (app.js:40845) at init (app.js:32026) at createComponent (app.js:34874) logError @ app.js:30798 app.js:29535 [Vue warn]: Error in render: "TypeError: Cannot read property 'profile_photo_url' of null"

found in

---> at resources/js/Layouts/AppLayout.vue at resources/js/Pages/Dashboard.vue warn @ app.js:29535 app.js:30798 TypeError: Cannot read property 'profile_photo_url' of null at Proxy.render (app.js:26160) at VueComponent.Vue._render (app.js:32452) at VueComponent.updateComponent (app.js:32968) at Watcher.get (app.js:33379) at Watcher.run (app.js:33454) at flushSchedulerQueue (app.js:33212) at Array. (app.js:30890) at flushCallbacks (app.js:30816)

Activity icon

Replied to Laravel 8 Jetstream - Vue Error

It fixed itself again as soon as I run into that again I will copy the whole error code, thanks for the reply.

Activity icon

Started a new Conversation Laravel 8 Jetstream - Vue Error

I have setup a small project to learn Inertia with Vue in Laravel 8. After a while, I am getting this error in the console.

app.js:29535 [Vue warn]: Error in render: "TypeError: Cannot read property 'profile_photo_url' of null"

also in next section,

app.js:30798 TypeError: Cannot read property 'profile_photo_url' of null

Sometimes if I restart the local server it fixes by itself. but after a while, it comes back again.

Please, how can I fix this problem?

Aug
19
3 months ago
Activity icon

Replied to Foreign Key Error

It worked thanks a lot...

Activity icon

Started a new Conversation Foreign Key Error

I am working with laravel 5.8 and creation of 2 new tables I am facing strange problem. The foreign key relationship is not working.

1st table (documents):

Schema::create('documents', function (Blueprint $table) { $table->increments('id'); $table->string('first_name'); $table->string('last_name'); $table->string('email'); $table->string('contact'); $table->string('reference'); $table->string('document_type'); $table->string('notes'); $table->timestamps(); });

2nd table (document_files):

Schema::create('document_files', function (Blueprint $table) { $table->increments('id'); $table->string('file_name'); $table->unsignedBigInteger('document_id'); $table->timestamps(); $table->foreign('document_id')->references('id')->on('documents')->onDelete('cascade'); });

I am getting foreign key error:

Illuminate\Database\QueryException : SQLSTATE[HY000]: General error: 1005 Can't create table api_hilbertis.#sql-1a8c_405 (errno: 150 "Foreign key constraint is incorrectly formed") (SQL: alter table document_files add constraint document_files_document_id_foreign foreign key (document_id) references documents (id) on delete cascade)

The order of the migration is ok, as I ran the documents table first, still getting this error. Any help would be appriciated.

Aug
09
3 months ago
Activity icon

Replied to How Can I Return A Value With Redirect Back

Thank you all, it worked:)

Activity icon

Started a new Conversation How Can I Return A Value With Redirect Back

After a form submit I am calling result method and from there I am running a query $calculations = Transaction::where('product_name',$request->product)->where('real_date',$request->date)->get();

Now I want to return the $calculations in the same blade file where the form was, where there is a table I want to populate with this data. I am trying this but not working.

return back()->with(['calculations'=>$calculations]);

or

return back()->with(compact('calculations'));

the data returns empty when I dd in the blade file.

Jul
13
4 months ago
Activity icon

Replied to What Am I Doing Wrong?

Excellent thank you very much :)

Activity icon

Started a new Conversation What Am I Doing Wrong?

I am trying the new foreign key relationships in laravel 7 migrations.

I am trying to connect users table with roles table. So wrote the following codes in the migrations

users table:

Schema::create('users', function (Blueprint $table) { $table->id(); $table->string('name'); $table->string('email')->unique(); $table->timestamp('email_verified_at')->nullable(); $table->string('password'); $table->foreignId('role_id')->constrained('roles'); $table->rememberToken(); $table->timestamps(); });

roles table:

Schema::create('roles', function (Blueprint $table) { $table->id(); $table->string('role_name'); $table->timestamps(); });

but i am getting error invalid relationship:

SQLSTATE[HY000]: General error: 1005 Can't create table test.users (errno: 150 "Foreign key constraint is incorrectly formed") (SQL: alter table users add constraint users_role_id_foreign foreign key (role_id) references roles (id))

Why is that, if I do the opposite it works. And if I created a posts table and define user_id for the relationship with users it works. What am I missing here?

How can I make relationship with the users with roles?

Jun
16
5 months ago
Activity icon

Replied to How To Convert Strings To Float In Blade File

Excellent worked , thank you very much :)

Activity icon

Started a new Conversation How To Convert Strings To Float In Blade File

Hi,

I have two string values coming from two different sources in a blade file. Now I need to multiply them, how can I convert them to float values to get multiplied values?

€{{$item->montant}} * {{($product->price)}}

thanks

Jun
11
5 months ago
Activity icon

Replied to Need To Fix An Array

I am getting the array like this, I need to remove the first element [0], how can I do that, I tried array shift doesnt work.

array:28 [▼ 0 => [] 1 => "GB00BGKB5M18" 2 => "GB00BGKB5N25" 3 => "GB00BH45C582" 4 => "GB00BHZPY402" 5 => "GB00BHZPYP16" 6 => "GB00BHZRQW80" 7 => "GB00BJ5RY394" 8 => "GB00BKF07B47" 9 => "GB00BKF07C53" 10 => "GB00BKF07D60" 11 => "GB00BKF07F84" 12 => "XS1676902973" 13 => "XS1676930321" 14 => "XS1853974241" 15 => "XS1877205325" 16 => "XS1890026708" 17 => "XS1923339623" 18 => "XS1923346834" 19 => "XS1944437901" 20 => "XS1980010232" 21 => "XS1992977246" 22 => "XS2006327022" 23 => "XS2018836523" 24 => "XS2037375487" 25 => "XS2067166145" 26 => "XS2077638703" 27 => "XS2098060291" ]

Activity icon

Replied to Need To Fix An Array

@tykus Excellento.... thank you very much

Activity icon

Started a new Conversation Need To Fix An Array

I need to fix the following array,

"array:28 [▼ 0 => [] 6 => 45000 7 => 240035 8 => 100000 9 => 555579 10 => 812306 11 => 500000 12 => 0 13 => 1729 14 => 991 15 => 0 16 => 16377 17 => 1117000 18 => 0 19 => 1790000 20 => 0 21 => 0 22 => 600000 23 => 405000 24 => 1462000 25 => 1926000 26 => 790000 27 => 0 28 => 389000 29 => 1277000 30 => 1051000 31 => 937208 32 => 1067000 ]"

How can fix this so that it starts from 0,1,2,3,4 and so on ?

Jun
02
5 months ago
Activity icon

Replied to How To Access This Array

@tykus That worked perfectly . Thanks you very much for your Help :)

Activity icon

Replied to How To Access This Array

Can I name the key to access like a variable?

Activity icon

Replied to How To Access This Array

thank you. How can I show the data into a blade file? I need to subgroup.

for example:

first group:

ISIN: GB00BGKB5N25

	Clients name 				UnitTotal
	Clients name 				UnitTotal
	Clients name 				UnitTotal
	Clients name 				UnitTotal

Second group:

ISIN: GB00BGKB5N25

	Clients name 				UnitTotal
	Clients name 				UnitTotal
	Clients name 				UnitTotal
	Clients name 				UnitTotal

like this

Activity icon

Replied to How To Access This Array

https://ibb.co/6ZZGsMy

Just an image link to view the result clearly

Activity icon

Started a new Conversation How To Access This Array

I have a collection and array like the following (After dd)

"Collection {#1466 ▼ #items: array:21 [▼ "GB00BGKB5N25" => Collection {#734 ▼ #items: array:20 [▼ 0 => {#749 ▼ +"client_id": "UK2402473" +"client_name": "Andrew Meade" +"product_name": "Astute Growth 5 Year Bond 8.9% 31 December 2023" +"product_isin": "GB00BGKB5N25" +"unitTotal": "3929.0000" } 1 => {#745 ▼ +"client_id": "UK1102224" +"client_name": "Wayne Pattimore" +"product_name": "Astute Growth 5 Year Bond 8.9% 31 December 2023" +"product_isin": "GB00BGKB5N25" +"unitTotal": "9806.0000" } ] }"

How can I access the fields ? like product_isin, unit_total etc...

May
22
6 months ago
Activity icon

Started a new Conversation Need To Fix An Array To A Numbered Serial

HI, I have merged 2 array using array_merge() after that I am getting serialisation problem as I need to compare with another array I cannot loop through.

The array is coming like this;

array:24 [▼ 0 => "GB00BKF07C53" 1 => "GB00BKF07F84" 2 => "GB00BKF07B47" 3 => "XS1992977246" 4 => "GB00BGKB5N25" 5 => "GB00BH45C582" 6 => "XS1923346834" 7 => "XS1676902973" 8 => "GB00BHZPY402" 9 => "GB00BHZPYP16" 10 => "XS2018836523" 11 => "XS1980010232" 12 => "GB00BJ5RY394" 13 => "GB00BHZRQW80" 14 => "XS1853974241" 15 => "XS2006327022" 16 => "XS2037375487" 17 => "XS1944437901" 18 => "XS1923339623" 19 => "GB00BGKB5M18" 20 => "XS2077638703" 21 => "XS2067166145" 41 => "XS2098060291" 42 => "XS2121371541" ]

so after 21 its 41 and 42, How to fix this in PHP. I have this in $final_isin_list variable.

Thanks