nevakil

nevakil

Member Since 6 Months Ago

Experience Points
770
Total
Experience

4,230 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
770 XP
Sep
12
1 month ago
Activity icon

Started a new Conversation I Can't Get This To Work

Disclaimer: I don't understand eloquent enough. Please help

This does not work, please help!

$car = Car::all();
$customer = $car->brand;
return response()->json($brand->toArray(), 200);

This does work for me but I need more data

$car = Car::findOrFail($id);
$customer = $car->brand;

return response()->json($brand->toArray(), 200);

Can some one explain this to me?

Sep
03
1 month ago
Activity icon

Replied to Show URLs To External Sites

Thank you, that works

Activity icon

Replied to Command From My Code

@martinbean what is wrong with calling artisan command in my code? Migration was just example. I use it for more things now.

Activity icon

Started a new Conversation Show URLs To External Sites

Hi,

I have a profile component in my application. User can leave an URL like facebook or twitter to their online profile. I can't get the URL to work

This is my code

<a href="{{url($user->facebook_link)}}">Facebook Profile</a>
<a href="{{url($user->twitter_url)}}">Twitter Profile</a>

Can someone help me to this the right way?

Activity icon

Started a new Conversation Prevent Updates From Other Users

Hi,

I have a digital shop where people can create their own products. I want to prevent people from updating and deleting products from another user. I store the user_id of the creator of the product and I added this to muy controller

if (!$product->user_id != Auth::id()) {
   DO SOMETHIN~G HERE
}

Is there a better way to do this?

Aug
13
2 months ago
Activity icon

Replied to Command From My Code

@bobbybouwmann Thanks for correct reply. This works.

Activity icon

Replied to Command From My Code

@nevakil I do to test things out.

Activity icon

Replied to Command From My Code

@martinbean That is not what I want

Activity icon

Started a new Conversation Command From My Code

How can I call artisan commando’s not on command line? I know I can run them from the command line but I want to perform action in my special controller. Is it possible?

May
30
4 months ago
Activity icon

Replied to Running Code In Console Fails

Thank you. That was not clear in tutoiral

Activity icon

Started a new Conversation Running Code In Console Fails

I'm trying to run Laravel code in the console and it fails. I'm following multiple tutorials but nothing works

$user = User::create(['name' => 'Dogo', 'email' => '[email protected]']);

It always gives me this error

zsh: parse error near `)'
May
28
4 months ago
Activity icon

Started a new Conversation How To Retrieves Multiple Files From Server To My Local Composer?

I have a few files on my digital ocean server and I need to look into them on my computer. I have an Apple macbook and I don't know how to get started with this. I have SSH access to the server.

May
03
5 months ago
Activity icon

Started a new Conversation Unique Email With Update User

Hi,

I have a unique contstraint on email and also in validation. When I update user I get error saying that email already exists. How to get around this?

public function rules() { return array( 'first_name' => 'required|string|max:255', 'last_name' => 'required|string|max:255', 'email' => 'required|string|email|max:255|unique:users,email', ); }

Apr
26
5 months ago
Activity icon

Started a new Conversation I Cant Get Pluck To Work

"Call to a member function pluck() on array"

$orders = $orders->pluck('created_at')->all();

Apr
19
6 months ago
Activity icon

Replied to Get Multiple Tables In Response

Where can I read about this in the documentttation?

Activity icon

Replied to Validation Error Does Not Show

Silly me. Thanks

Activity icon

Started a new Conversation Get Multiple Tables In Response

Hi,

I'm making a blog. I have a table posts comments and categories. I have a single route for the post. I also want to show all ratings and comments. How to get this data?

Activity icon

Started a new Conversation Validation Error Does Not Show

Hi,

My validaiton error is not showing for uploaded file. Can you please help?

This is my code

public function store(Request $request, $id)
{
    $this->validate($request,[
        'nim' => 'required|digits:8',
        'nama' => 'required',
        'alamat' => 'required'
    ]);

    $profile = User::find($id);

    $file = $request->file('photo');

    if($file){
        $this->validate($request,[
            'bilde' => 'required|image|dimensions:max_width=250, max_height=250'
        ]);

        $profile->photo = $request->file('photo')->store('public/bildes');
        $profile->save();
    }

    $profile->nim = ;
    $profile->nama = $request->nama;
    $profile->alamat = $request->alamat;

    $profile->update([
        'nim' => $request->nim,
        'nama' => $request->nama,
        'alamat' => $request->alamat
    ]);

    return redirect()->back();
}
Activity icon

Replied to Error: Namespace Declaration Statement Has To Be The Very First

I had a new line before the tag. Make it readable. Thanks for helping me.

Activity icon

Started a new Conversation Error: Namespace Declaration Statement Has To Be The Very First

Hi,

I get this error, can someone help me?

Namespace declaration statement has to be the very first statement

My code looks like this

<?php

namespace App\Http\Controllers\Admin;

class PostsController extends Controller
{
    public function index()
    {
        return view('admin.posts.index');
    }
}