edoc

Hire Me

Experience

65,580

81 Best Reply Awards

  • Member Since 2 Years Ago
  • 146 Lessons Completed
  • 0 Favorites

4th January, 2018

edoc left a reply on How To Add A Querystring With A Blade Variable From Foreach ? • 2 weeks ago

<a href="{{ action("Ulbgt\[email protected]", ['stations' => $details->stations[0]['transfer_request_id]) }}">

9th December, 2017

edoc left a reply on Having Doubts With The Laracasts Series Steps • 1 month ago

just start coding.

what are you doing? lol

edoc left a reply on Stuck With Type Error: Argument 1 Passed... • 1 month ago

I think you have to return the User model instance

20th October, 2017

edoc left a reply on Model Passed To Controler • 2 months ago

id

But you can change that. For example, if you have an Article model and you wanna use a slug column to be used for route model binding.

Article.php

public function getRouteKeyName()
{
    return 'slug';
}

edoc left a reply on Grid Template Compatibility • 2 months ago

????

edoc left a reply on File Upload/edit Form. • 2 months ago

First of all, do you know the route model binding? and what is the slug for?

edoc left a reply on File Upload/edit Form. • 2 months ago

I am not bitching at all but, code examples would be much more efficient if you wanna get help from fellow Laracasts members

edoc left a reply on What I Select The Ramdom 8 Records In Laravel ? • 2 months ago

YourModel::inRandomOrder()->take(8)->get();

Like that?

edoc left a reply on What I Select The Ramdom 8 Records In Laravel ? • 2 months ago

without model what do you mean?

15th October, 2017

edoc left a reply on How To Get Answers To The Questions ? • 3 months ago

@ChristophHarms You are on point!!

12th October, 2017

edoc left a reply on Select Columns From Eager Loaded Tables • 3 months ago

that's because you didn't select the foreign key

edoc left a reply on Date Field (Form::date) Not Showing Value On Mobile Version • 3 months ago

fffffffffffffffffffffffffffffffffff

11th October, 2017

edoc left a reply on FatalThrowableError In Pages.php Line 14: • 3 months ago

I am pretty sure you have $table->timestamps() is your migration file

edoc left a reply on FatalThrowableError In Pages.php Line 14: • 3 months ago

can you create another topic if you solved your first question?

edoc left a reply on FatalThrowableError In Pages.php Line 14: • 3 months ago

$

10th October, 2017

edoc left a reply on Select Columns From Eager Loaded Tables • 3 months ago

Hi, thx for your replies but both don't work....

Don't you think you need to explain why that does not work??

edoc left a reply on Select Columns From Eager Loaded Tables • 3 months ago

I wonder why i pent my time for this

9th October, 2017

edoc left a reply on How Can I Get The Last Key? • 3 months ago

You want the last key in the collection right? try if this works

$sessions->count() - 1

7th October, 2017

edoc left a reply on Return Instance With Relationships After Saving It. • 3 months ago

        return $savedRequest->load('cropInputMaterial');

6th October, 2017

edoc left a reply on How Does Auth::user()->name And Auth::user()->email Work • 3 months ago

Probably it's hidden isn't it??

protected $hidden=['email', 'password'] on you User model

edoc left a reply on $errors->has('something') With Array • 3 months ago

@if ($errors->haAnys(['name', 'email', 'password']) )

edoc left a reply on $errors->has('something') With Array • 3 months ago

$errors->has('name', 'email', 'password')

5th October, 2017

edoc left a reply on Vue Error Every Time App.scss Is Compiled • 3 months ago

@goatshark Yea I was actually about to tell you the same. The error seems to be fixed after updating Laravel Mix.

Thanks for letting me know! Have a good one

edoc left a reply on Select Columns From Eager Loaded Tables • 3 months ago

Did you know you can do this?

$result = OrderRelation::where('relation_id', $relation_id)->with('articles:articles_id,price')->get()

Instead of this

$result = OrderRelation::where('relation_id', $relation_id)->with(['articles' => function($query) {
    $query->select('article_id', 'price');
}])->get()

4th October, 2017

edoc left a reply on GroupBy Relation Returns Empty • 3 months ago

public function answersCount(){
        return $this->answers()->select('answer')->selectRaw('count(*) as aggregate')->groupBy('answer');
    }

select stack_id as well

3rd October, 2017

edoc left a reply on Request Attributes • 3 months ago

can't you just use array_merge?

2nd October, 2017

edoc left a reply on Vue Error Every Time App.scss Is Compiled • 3 months ago

Thanks for the heads-up. What I have done so far

  • update Yarn to 1.1
  • update Node to 8.6
  • upgrade Laravel mix to 1.4.2
  • delete the node-modules folder and run yarn

But none of them worked. I will continue debugging the issue.

Good luck @goatshark

29th September, 2017

edoc left a reply on Toggle Inside V-for Items Affects The Entire List • 3 months ago

make a list component and toggle data in the component

27th September, 2017

edoc left a reply on How To Fix Undefined Variable: Collaborators • 3 months ago

Then how are you passing $collaborators??

edoc left a reply on Retrieve Parents Of Children • 3 months ago

$grandparent = Grandparent::where('id',$id)->firstOrFail();

$children = $grandparent->child;

$parents = $children->map(function($child) {
  return $child->parent;
});

dd($parents->unique())

edoc left a reply on Retrieve Parents Of Children • 3 months ago

$grandparent = Grandparent::where('id',$id)->firstOrFail();

$parent = $grandparent->child->parent;

Will this do?

edoc left a reply on How To Fix Undefined Variable: Collaborators • 3 months ago

can you show us the controller method? @Flex

edoc left a reply on Model New Directory • 3 months ago

probably typo in your seo model and check the file name

26th September, 2017

edoc left a reply on Route Duplicated • 3 months ago

prefix?

edoc left a reply on I Only Want To Update Email If Changes Have Been Made In The Edit Form. • 3 months ago

use Illuminate\Validation\Rule;

Validator::make($data, [
    'name' => [
        'required',
        Rule::unique('users')->ignore($user->id),
    ],
]);

edoc left a reply on Cant Save After Conditional Updates • 3 months ago

$statement_current = Statement::find($id)->get();

Are you trying to find a particular model or a collection of models?

$statement_current is a collection of models that's why you cannot call save method like that

edoc left a reply on Cant Save After Conditional Updates • 3 months ago

$statement_current = Statement::find($id)->get();

Are you trying to find a particular model or a collection of models?

$statement_current is a collection of models that's why you cannot call save method like that

25th September, 2017

edoc left a reply on Understanding About Helper. • 3 months ago

Why do you need to do this?

24th September, 2017

edoc left a reply on Blade Template Foreach Loop Split Every 15 Loops In Html List • 3 months ago

Did you mean this?

@foreach($items->chunk(15) as $chunk)
    <ul>
        @foreach($chunk as $item)
            <li>
                <a href="#">{!! $item->name !!}</a>
            </li>
        @endforeach 
    </ul>
@endforeach

edoc left a reply on Using Request::is() For Class Active • 3 months ago

try this request()->is('url', 'url/*')

21st September, 2017

edoc left a reply on Processing Videos • 3 months ago

Thanks @bashy

Didn't know video processing is such a pain in the ass

20th September, 2017

edoc left a reply on Uncaught ReflectionException Error After Deploying My Laravel Application • 3 months ago

check this class Class sneaker. shouldn't it be uppercase?

Edit Your Profile
Update

Want to change your profile photo? We pull from gravatar.com.