idodeva

idodeva

Member Since 1 Year Ago

Experience Points 290
Experience Level 1

4,710 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 Achievement

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • First Thousand Achievement

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • One Year Member Achievement

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • Two Year Member Achievement

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • Three Year Member Achievement

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • Four Year Member Achievement

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • Five Year Member Achievement

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • School In Session Achievement

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • Welcome To The Community Achievement

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • Full Time Learner Achievement

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • Pay It Forward Achievement

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • Subscriber Achievement

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • Lifer Achievement

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • Laracasts Evangelist Achievement

    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 Achievement

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • Laracasts Veteran Achievement

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • Ten Thousand Strong Achievement

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • Laracasts Master Achievement

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • Laracasts Tutor Achievement

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • Laracasts Sensei Achievement

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • Top 50 Achievement

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

08 Jul
11 months ago

idodeva left a reply on Variables Refer To The Same Value

didn't work only by that. Fixed it with this line:

@if(Config::get('app.locale') == 'de')

idodeva left a reply on Variables Refer To The Same Value

Honestly, this doesn't make any difference :/

idodeva started a new conversation Variables Refer To The Same Value

Hi all,

I have database with lessons, which are translated in English and German. In the database I have two columns - one for English and one for German translations. When I declare the following in the controller the variables don't change their values, no matter what language is selected. The else clause is not working. For example if I check first for en, the variables return the English translation only. Same for German.

    foreach(Config::get('languages') as $lang => $language){
        if ($lang = 'en'){
            $lesson_name = $lessons->lessonen;
            $lesson_desc = $lessons->descriptionde;
        }else{
            $lesson_name = $lessons->lessonde;
            $lesson_desc = $lessons->descriptionen;
        }
    } 

Do you know what could be causing this?

Thanks

11 Jun
1 year ago

idodeva left a reply on Language Switcher Not Working

Still not working..

idodeva started a new conversation Language Switcher Not Working

Hi all,

I am trying to dynamically display the texts in two languages - English or German. But I am failing the task because nothing happens.

I have done the following:

Middleware:

07 Jun
1 year ago

idodeva left a reply on Best Solution For Setting The Route

Ok. Thanks for the help :) Appreciated!

idodeva started a new conversation Best Solution For Setting The Route

Hi all,

I am trying to display a view for particular user. Have the code:

public function checkLogin(Request $request){
    $this->validate($request, [
        'email' => 'required|email',
        'password' => 'required|alphaNum|min:3'
    ]);

    $user_data = array(
        'email' => $request->get('email'),
        'password' => $request->get('password')
    );

    $id = Auth::id();

    if(Auth::attempt($user_data)){
        return redirect('welcome/'.$id);
    }else{
        return back()->with('error', 'Wrong Login Details');
    }
}

function successLogin($id){
    $students = AdditionalInfoStudent::with('user')->find($id);
    $first_name = $students->first_name;
    $last_name = $students->last_name;
    $faculty_number = $students->faculty_number;

    return view('welcome', compact('first_name','last_name','faculty_number'));
}

function logout(){
    Auth::logout();
    return redirect('login');
}

What is causing the problem is the following: $id = Auth::id();

    if(Auth::attempt($user_data)){
        return redirect('welcome/'.$id);
    

When logging in sometimes the variable id has value, but other time doesn't and the view is not displayed. How should I handle this?

Thanks in advance :)

06 Jun
1 year ago

idodeva started a new conversation Issue With Query Building - Property [..] Does Not Exist On This Collection Instance.

Hi all,

I am trying to build an app for university students.

My idea is to retrieve data from the database, where for each student should be displayed courses depending on which semester the student is. In other words if student A is in second semester and let's say the course Databases is being held only in second semester, for student A I should have on the page only Databases as eligible course.

I have the following relationships. User:

public function student(){ return $this->hasOne(App\AdditionalInfoStudents::class,'user_id'); }

Semester:

public function student(){
    return $this->hasMany(App\AdditionalInfoStudent::class,'semester_id');
}

public function course(){
    return $this->hasMany(App\Course::class,'semester_id');
}

Course:

public function semester(){
    return $this->belongsToMany(App\Semester::class);
}  

AdditionalInfoStudents:

public function user(){
    return $this->belongsTo(App\User::class);
}

public function semester(){
    return $this->belongsToMany(App\Semester::class);
} 

I wanna retrieve only the courses in semester N for a student who is in the same semester N. When trying the following I get: Property [semester_id] does not exist on this collection instance.

Can someone help me with this query?

Thanks in advance :)

04 Jun
1 year ago

idodeva started a new conversation Relational Database For Students/courses

Hi all,

I am trying to build an app for university students.

My idea is to retrieve data from the database, where for each student should be displayed courses depending on which semester the student is. In other words if student A is in second semester and let's say the course Databases is being held only in second semester, for student A I should have on the page only Databases as eligible course.

I have the following tables:

  • users

    public function up() { Schema::create('users', function (Blueprint $table) { $table->increments('id'); $table->string('name'); $table->string('email')->unique(); $table->string('password'); $table->rememberToken(); $table->timestamps(); }); }

  • semester

    public function up() { Schema::create('semesters', function (Blueprint $table) { $table->increments('id'); $table->integer('number'); $table->timestamps(); }); }

  • additional_info_students

    public function up() { Schema::create('additional_info_students', function (Blueprint $table) { $table->increments('id'); $table->integer('user_id')->unsigned(); $table->foreign('user_id')->references('id')->on('users'); $table->string('first_name', 255); $table->string('last_name', 255); $table->integer('faculty_number')->unique(); $table->integer('group_number'); $table->integer('year'); $table->integer('semester_id')->unsigned(); $table->foreign('semester_id')->references('id')->on('semesters'); $table->timestamps(); }); }

-courses public function up() { Schema::create('courses', function (Blueprint $table) { $table->increments('id'); $table->string('name', 255); $table->string('language', 10); $table->longText('description', 30000000); $table->integer('semester_id')->unsigned(); $table->foreign('semester_id')->references('id')->on('semesters'); $table->timestamps(); }); }

  • courses_assign_students

public function up() { Schema::create('courses_assign_students', function (Blueprint $table) { $table->increments('id'); $table->integer('student_id')->unsigned(); $table->foreign('student_id')->references('user_id')->on('additional_info_students'); $table->integer('courses_id')->unsigned(); $table->foreign('courses_id')->references('id')->on('courses'); $table->timestamps(); }); }

Would this work? I can not seem to join them correctly in order to get what I need.

Thanks in advance :)