edoc

edoc

横浜

Hire Me

Member Since 2 Years Ago

Experience Points 71,730
Experience
Level
Lessons Completed 213
Lessons
Completed
Best Reply Awards 77
Best Answer
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.

04 Nov
1 week ago

edoc left a reply on Trait 'App\Http\Controllers\Auth\AuthenticatesUsers' Not Found'

did you change the namespace of Transcribe\Http\Controllers\Auth\AuthenticatesUsers? it might be the cause of this error

edoc left a reply on How To Upload Pdf File In Laravel

Do you have enctype="multipart/form-data" on your form element?

<form action="" method="post" enctype="multipart/form-data">
</form>
03 Nov
1 week ago

edoc left a reply on Global Search Custom Query For One Resource

you can override this method in your resource class

ex.

/**
     * Build an "index" query for the given resource.
     *
     * @param  \Laravel\Nova\Http\Requests\NovaRequest  $request
     * @param  \Illuminate\Database\Eloquent\Builder  $query
     * @return \Illuminate\Database\Eloquent\Builder
     */
    public static function indexQuery(NovaRequest $request, $query)
    {
        if (!request()->filled('filters')) {
            return $query->whereNull('downloaded_at');
        }

        return $query;
    }

@devOps92

29 Oct
2 weeks ago

edoc left a reply on How I Can Pass Session To View

You forgot to add the array in to session.

change this

 $alerts = array('message'=>'Down Time of System', 'cls'=> 'success');

    return view('client.dashboard',['data' => $data])->with('alerts',$alerts);

to

 $alerts = session()->flash('alerts, [''message'=>'Down Time of System', 'cls'=> 'success']);

    return view('client.dashboard',['data' => $data])->with('alerts',$alerts);
25 Oct
3 weeks ago

edoc left a reply on How Get Just Id / Name From Relational Model?

$customers = Customer::where('is_approved', '=', 'approved')->with('brands:id, 'brand')->get();

This fetches customers where is_apprived is approved with related brands with only id and brand columns

24 Oct
3 weeks ago
20 Oct
3 weeks ago

edoc left a reply on Laravel Nova Redirect To A User-defined Path After Loggindg In

Seen you eyes son show. Far two unaffected one alteration apartments celebrated but middletons interested. Described deficient applauded consisted my me do. Passed edward two talent effect seemed engage six. On ye great do child sorry lived.

Seen you eyes son show. Far two unaffected one alteration apartments celebrated but middletons interested. Described deficient applauded consisted my me do. Passed edward two

Letter wooded direct two men indeed income sister. Impression up admiration he by partiality is. Instantly immediate his saw one day perceived. Old blushes respect but offices hearted minutes effects.

19 Oct
4 weeks ago

edoc started a new conversation Laravel Nova Redirect To A User-defined Path After Loggindg In

Is there a way to define a path to redirect a user to after logging in?

Ideally, I want to redirect a user to /admin/dashboard/users when logged in

/admin.dashboard is my root nova path

25 Aug
2 months ago
24 Aug
2 months ago

edoc left a reply on Limiting Characters In A Vue Text Area

Is this what you want? This is a simplified version. Hope you get the idea

https://jsfiddle.net/eywraw8t/299065/

27 Jul
3 months ago

edoc left a reply on Call To A Member Function GetClientOriginalName() On Null

Do you have enctype="multipart/form-data" on your form element?

<form action="" method="post" enctype="multipart/form-data">
</form>
16 Jun
5 months ago

edoc left a reply on Laravel Active Menu Item For Url Included Parameters

should be like this

 class="list-group-item{{ request()->is('articles') ? ' active' : '' }}"
09 Jun
5 months ago

edoc left a reply on No Idea Why File Is Not Uploading.

Do you have enctype="multipart/form-data" on your form element?

<form action="/action_page_binary.asp" method="post" enctype="multipart/form-
</form>
02 Jun
5 months ago

edoc left a reply on How To Get Cities On The Basis Of Country Id

you can use a hasMany relation

App\Country


    public function cities()
    {
        return $this->hasManyThrough('App\City', 'App\State');
    }

And then you can eager load cities like this

Country::with('cities')->get();]
27 May
5 months ago

edoc left a reply on Call To A Member Function GetClientOriginalName On Null

1enctype="multiform/form-data"1

shouldn't this be

enctype='multipart/form-data'?

10 Apr
7 months ago

edoc left a reply on Why My Laravel Website Is So Slow?

Just let you know some of the pages on the pac page return this

url="https://www.m5idoingit.com/uk-gb/products/cloud/cloud-servers"

01 Apr
7 months ago

edoc left a reply on Hey Guys I'm Making Company Project In Laravel 5.4 Where User Can Create Company And Change The Company Image I'm Able To Save The Image Into Public But It's Not Changing I'm Facing This Error

$company =company::where('user_id', Auth::user()->id)->get();

should be if you want to update a certain model.

$company =company::where('user_id', Auth::user()->id)->first();
21 Feb
8 months ago

edoc left a reply on Preserve The Dynamic Input Tag If Validation Error Occur?

no need to bump an old thread

edoc left a reply on Flash Session Data In Blade Without Passing From Controller

I read the view composers but it is saying there needs to be a route to the view

No you should be able to do something like this in a file such as AppServiceProvider

  view()->composer('partials.nav', function ($view) {
            $messages= Message::get();
           
            $view->with('messages', $messages));
        });

Then in your nav you can access this $messages variable

edoc left a reply on Strange Insert Error..Integrity Constraint Violation

This should be

$message->fill(['from'=>auth()->user()->id],
            ['to_'=>$id],
            ['message'=>'kkssd'],
            ['date'=>date('Y-m-d')]);

this

$message->fill([,
            'to_'=>$id,
            'message'=>'kkssd',
            'date'=>date('Y-m-d'),
            'from'=>auth()->user()->id
]);

edoc left a reply on Strange Insert Error..Integrity Constraint Violation

$message->fill(['from'=>auth()->user()->id, 'to_'=>$id])->save(),
07 Feb
9 months ago

edoc left a reply on Trying To Get Property 'name' Of Non-object

$rooms = Room::with('roomcat')->get();

        foreach($rooms as $room){
          echo  $rooms->roomcat->name;
        }

edoc left a reply on Trying To Get Property 'name' Of Non-object

try $rooms->room_cats->name;

06 Feb
9 months ago

edoc left a reply on Specifying Columns For Eager-loaded Relationships

The same. If I specify any columns for that relationship, it returns no results. It doesn't matter what the column is.

Does it happen even after adding thread_id to posts like this?

$threads = Thread::latest('updated_at')
        ->with([
            'author:id,username',
            'forum:id,name,ic',
            'posts:id,thread_id,created_at'
        ]);
    
27 Jan
9 months ago
26 Jan
9 months ago

edoc left a reply on MethodNotAllowedHttpException

you don't wanna share the solution?

edoc left a reply on MethodNotAllowedHttpException

please paste your route file

24 Jan
9 months ago

edoc left a reply on WISIWYG Editor

tinymce is shit

04 Jan
10 months ago

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

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

09 Dec
11 months ago

edoc left a reply on Having Doubts With The Laracasts Series Steps

just start coding.

what are you doing? lol

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

I think you have to return the User model instance

20 Oct
1 year ago

edoc left a reply on Model Passed To Controler

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 File Upload/edit Form.

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.

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 ?

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

Like that?

edoc left a reply on What I Select The Ramdom 8 Records In Laravel ?

without model what do you mean?

15 Oct
1 year ago
12 Oct
1 year ago

edoc left a reply on Select Columns From Eager Loaded Tables

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

fffffffffffffffffffffffffffffffffff

11 Oct
1 year ago

edoc left a reply on FatalThrowableError In Pages.php Line 14:

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

edoc left a reply on FatalThrowableError In Pages.php Line 14:

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