diegoarbelaez

diegoarbelaez

Member Since 3 Years Ago

Milford

Experience Points
80
Total
Experience

4,920 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
0
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 1
80 XP
Mar
21
4 months ago
Activity icon

Replied to Undefined Variable - Laravel 7 - Components

Thanks @ksandar , it does work if i pass the variable via the component tag and does seem to be ignoring the constructor, almost seems as if the component constructor is not being called.

Thanks for the link - issue does sound similar i'll follow up with them as i'm already on the Laravel mentioned there - will provide updates once resolved.

Activity icon

Replied to Undefined Variable - Laravel 7 - Components

@jeevamugunthan as noted in the description this does work in development but does not work in a shared hosting environment - leads me to believe it is something with a server setting or missing feature. Thanks for the input though.

@ksandar opcache does not seem to be enabled on my shared hosting - at least the function is not available.

Mar
20
4 months ago
Activity icon

Replied to Undefined Variable - Laravel 7 - Components

Yeah, already tried that with no luck

Activity icon

Started a new Conversation Undefined Variable - Laravel 7 - Components

I have a weird issue where i'm setting a variable for a Laravel 7 Component to be displayed in the component. While it works in my development environment (MAMP on MacOS) it does not work when i load it to my shared hosting in HostGator. In HostGator it throws a 500 error complaining about "Undefined Variable: page_title".

Any ideas as to what could be happening here?

<!-- App/Components/Layout/ContentHeader.php -->
<?php

namespace App\View\Components\layout;

use Illuminate\Support\Facades\Request;
use Illuminate\View\Component;

class ContentHeader extends Component
{
	/**
	 * @var string
	 */
	public $page_title;
	
	/**
	 * @var array
	 */
	public $breadcrumbs = [];
	
    /**
     * Create a new component instance.
     *
     * @return void
     */
    public function __construct()
    {
        //
	$this->page_title = 'Some title';
	$crumb = new \stdClass();
	    $crumb->label = 'Home';
	    $crumb->active = false;
	    $this->breadcrumbs[] = $crumb;
		   
	    $crumb = new \stdClass();
	    $crumb->label = $this->page_title;
	    $crumb->active = true;
	    $this->breadcrumbs[] = $crumb;
    }

    /**
     * Get the view / contents that represent the component.
     *
     * @return \Illuminate\View\View|string
     */
    public function render()
    {
        return view('components.layout.content-header');
    }
}
<!-- Resources/views/components/layout/content-header.blade.php -->
<div class="content-header">
	<div class="container-fluid">
		<div class="row mb-2">
			<div class="col-sm-6">
				<h1 class="m-0 text-dark">{{ $page_title }}</h1>
			</div><!-- /.col -->
			<div class="col-sm-6">
				<ol class="breadcrumb float-sm-right">
					@foreach ($breadcrumbs as $crumb)
						@if (!$crumb->active)
							<li class="breadcrumb-item"><a href="#">{{ $crumb->label }}</a></li>
						@else
							<li class="breadcrumb-item active">{{ $crumb->label }}</li>
						@endif
					@endforeach
				</ol>
			</div><!-- /.col -->
		</div><!-- /.row -->
	</div><!-- /.container-fluid -->
</div>
<!-- /.content-header -->```