Edgy

Edgy

Member Since 1 Year Ago

Rome

Experience Points 1,480
Experience Level 1

3,520 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-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-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-token Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • lara-evanghelist 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.

18 Jan
1 year ago

Edgy started a new conversation Edit/update With Relationship

Hi folks, I have a serious problem in my thesis, Here are my problems in relationships: I have 2 tables, workers which is the list of users, and workers_skills which are set of skills connected to workers. Under workers_skills it has 2 columns, workers_id and workers_skills Example:

// `workers_skills`
workers_id  |   skills
1   masonry
1   barista
1   cuoco
2   lavapiatti

// `workers`
id  |   name
1   Giuseppe Amarino
2   Marco   Centrale

It will look for an id in workers then after update, it will automatically change the value in workers_skills. example, I will edit the masonry and change it to waiter, it will find the id which is 1 from workers and it will edit/update it in workers_skills who have 1 in their workers_id and change the masonry to waiter. is this possible?

//This is a controller
    public function edit($id)
    {
        $edit_profile = Worker::find($id);
        return view('worker.profile.edit',compact('edit_profile'));
    }

 
    public function update(Request $request, $id)
    {
        request()->validate([
       
        ]);
        WorkerSkills::find($id)->update($request->all());
        return redirect()->route('worker.profile.index')
                        ->with('success','Article updated successfully');
    }
04 Jan
1 year ago

Edgy left a reply on How Do I Prevent Looping The Title Tag?

@martinbean Hi, you mean this?

//QualcosaController.php
$workers_skills = WorkersSkill::where('workers_id', Auth::user()->id)->get();

Edgy left a reply on How Do I Prevent Looping The Title Tag?

Hi @martinbean , 2 columns workers_expertise and workers_skill_role. workers_skill_role is more likely the main category and workers_expertise is the list of skills

Edgy left a reply on How Do I Prevent Looping The Title Tag?

Hi @martinbean

I have lots of column like seo, web development and etc. so if the table exist with seo it will loop the data together with the h2 tag. If I put the title tag outside forloops, it will become static. this will might happen

//Reality
// <h2> SEO </h2> This will happen if I put outside foreach
seo 1
seo 2
seo 3
web development
writing
student blogs
student writings
// My Expectation
// <h2> SEO </h2>
seo 1
seo 2
seo 3

// <h2> Web Development </h2>
php
laravel
laracast

Edgy started a new conversation How Do I Prevent Looping The Title Tag?

Hi, how do I prevent the looping of the <h2> SEO </h2> ?

@foreach ($workers_skills as $workers_skill)

    @switch($workers_skill->workers_skill_role)
        @case('seo')
        // this H2 tag
        <h2>SEO</h2>
            
        {{$workers_skill->workers_expertise}}
        @break  
    

        //more switches codes here
@endforeach 
//Output
//SEO
//-seo 1

//SEO
//-seo 2

//SEO
//-seo 3

and It should be like this

// My Expectation
// <h2> SEO </h2>
seo 1
seo 2
seo 3

// <h2> Web Development </h2>
php
laravel
laracast

Thank you

Edgy left a reply on Adding Where Clause In Blade

Hi @tisuchi, I am near to finish the functionality but I have some questions:

<h2> is also included in loop, how do I exempt or not include the <h2> Title Tag in for loop? and my 2nd question is, for example, the SEO in table is doesn't exist, it will also hide the <h2> tag is this possible?

@foreach ($workers_skills as $workers_skill)

     @if($workers_skill->workers_skill_role === 'SEO')
        <h2> SEO </h2>
            {{$workers_skill->workers_expertise}}<br>
     @endif 

        @if($workers_skill->workers_skill_role === 'Writing')
        <h2> Writing </h2>
            {{$workers_skill->workers_expertise}}<br>
        @endif 

@endforeach 

//This is Output
// <h2> SEO
// offpage
// <h2> SEO
// onpage

Thank you for your help

Edgy left a reply on Adding Where Clause In Blade

Hi @topvillas

Thank you, could you help me how do I convert these codes or example? I couldn't understand well the documentations.

Thank you

03 Jan
1 year ago

Edgy started a new conversation Adding Where Clause In Blade

Hi guys, is there any way to add where clause in blade template in foreach loop? I don't think putting multiple eloquent in controller is a good idea so I assume if this is possible, like this:

<h1> work expertise </h1>
@foreach ($workers_skills as $workers_skill)
        {{$workers_skill->workers_expertise->where('skills', 'seo') }}
@endforeach 

@foreach ($workers_skills as $workers_skill)
        {{$workers_skill->workers_expertise->where('skills, 'web') }}
@endforeach

Thanks

02 Jan
1 year ago

Edgy left a reply on How Do I Get The Latest Data Using GroupBy?

Fixed

->orderBy('id', 'desc')
->get()
->unique('workers_thesis_id');

Edgy left a reply on How Do I Get The Latest Data Using GroupBy?

Hi @sheldonscott

Thank you, but I dont get any errors in my groupby. the latest data or id is not showing, only the first data.

thanks.

Edgy started a new conversation How Do I Get The Latest Data Using GroupBy?

how do I order the query and get the latest result? I always get the first data in SQL.

//I tried several codes but not working
$workers_messages = InboxMailThesis::where('workers_id, Auth::user()->id)
->groupBy('workers_thesis_id')

//->orderBy('id', 'desc')
//->orderBy('id', 'asc')
//->latest()

->paginate(5);


Thanks

Edgy left a reply on Relationship: Property [inbox_message] Does Not Exist On This Collection Instance.

Hi,

I tried to change the blade to {{ $workers_message->inboxmail }} I tried the above codes but it doesnt work well.

and in relationship mode, I add the hasMany with ->take(1). but then the view returns array, is there any way to fix this?

Thanks

31 Dec
1 year ago

Edgy left a reply on Relationship: Property [inbox_message] Does Not Exist On This Collection Instance.

Hi @Snapey ,

I think I figure the problems, but can't figure out how to fix this. It's looks like I have many inbox_messages so Is there any way to add 'WHERE' clause or latestin view? I only need the latest data.

Thanks

Edgy started a new conversation Relationship: Property [inbox_message] Does Not Exist On This Collection Instance.

Hi guys, I have an error Property [inbox_message] does not exist on this collection instance. So basically, the workers_applications.id must be the same to all of my inbox_mails.workers_applications_id. So in table workers_applications there's only 1 applicant while in inbox_mails there's more than 2. any help guys? thanks.

//InboxMail.php (Model)

 public function workerapplicationinbox(){
        return $this->belongsTo('App\WorkersApplication', 'workers_applications_id', 'id' );
    }
//WorkersApplication.php (Model)

public function inboxmail(){
        return $this->hasMany('App\InboxMail', 'id', 'workers_applications_id');
    }
//view
{{$workers_message->inboxmail->inbox_message}}
30 Dec
1 year ago

Edgy left a reply on How Do I Prevent Other Auth::user To See The Inbox?

Fixed, kindly delete this thread. Thanks

Edgy started a new conversation How Do I Prevent Other Auth::user To See The Inbox?

HI guys, how do I prevent other Auth::users from showing the data in show() ? example: /public/inbox/41 and other user can randomly change the number from 41 to /public/inbox/42 and they can see the messages?

here are my codes:

public function show($id)
    {   
//This is a controller
 $workers_messages = WorkersApplicationThesis::where('workers_id', Auth::user()->id)
        ->where('workers_applications_id', $id)
        ->find($id);
        
        $inbox_messages = InboxMailThesis::all()
        ->where('workers_id', Auth::user()->id)
        ->where('workers_applications_id', $id)
        ->sortByDesc('id');
}

Edgy left a reply on Hesto MultiAuth - How To Get User() In Different Auth?

Hi @king_eke

thank you, I will try to figure out and apply in my thesis app.

29 Dec
1 year ago

Edgy started a new conversation Hesto MultiAuth - How To Get User() In Different Auth?

Hi guys,

I am using Hesto Multi Auth for my thesis, I have 2 Auth accounts, jobseeker and jobemployer, so the link will be public/jobseeker/ and public/jobemployer/. Here is my main problem. In guest page public/index/ I don't have any auth because the auth is in /jobemployer/ or /jobseeker/ how do I get the Auth::user->name from different tables like jobseeker and jobemployer?

Thanks

23 Dec
1 year ago

Edgy left a reply on Cache Buster Or Versioning Not Working

Fixed

// add asset()
<link rel="stylesheet" href="{{ asset(mix('/css/app.css')) }}">

Edgy left a reply on Cache Buster Or Versioning Not Working

@Yama

I found the culprit, the link directs to /css/app.css instead of http://localhost:8888/thesis/public/css/app.css is there any fix on this? tried to change the link but I always got an error

Edgy left a reply on Cache Buster Or Versioning Not Working

Hi @Yama

you mean like this?

mix.js('resources/assets/js/app.js', 'public/js');

if (mix.inProduction()) {
    mix.version();
}

Edgy started a new conversation Cache Buster Or Versioning Not Working

Mix Laravel cache buster not working, how can I fix this? I also changed the rel link from asset to mix and the .css files are not generating random numbers like (app.css1312321432535).

Thanks

mix.js('resources/assets/js/app.js', 'public/js')
   .sass('resources/assets/sass/app.scss', 'public/css')
   .version();
20 Dec
1 year ago

Edgy left a reply on How Do You Create A Search Functionality In Laravel?

@topvillas

Hi, but using LIKE is secured and safe? I only use 1 function or 1 search only. Do you think do I need Scout for simple function? What is your suggestions?

Thanks

Edgy started a new conversation How Do You Create A Search Functionality In Laravel?

Hi,

I am new to laravel and I want some feedback from professional developers in Laracast. How do you usually create a search from Database? i'm using Eloquent and when I search it in Google, it has 2 options. 1st is the typical search.blade.php and the 2nd is somewhat called Laravel Scout or Algolia. I am confused on these 2 options. Which of these you usually do and why?

Thanks for information.

19 Dec
1 year ago

Edgy left a reply on Conflicting Of Route, How To Fix This?

I cant believe on myself that I missed that typo. Thanks mate

Edgy started a new conversation Conflicting Of Route, How To Fix This?

I have a conflicting route, how can I fix this? I figure out that these 2 routes conflict each other, the inbox.create is working properly, but the jobs.create have a problem, Route not defined. The jobs.create action from route:list is using WorkersTestController instead EmployersTestController. Is there any way to solve this conflicting routes?

Thanks.

// employer.php (this is route)
Route::prefix('/')->middleware('employer')->group(function () {
    Route::get   ('jobs/create','[email protected]')->name('jobs.create');
    Route::get   ('jobs/create','[email protected]')->name('inbox.create');

16 Dec
1 year ago

Edgy started a new conversation Simple Paginate Not Working

Hi guys, I have an error where undefined method.

$workers_test = WorkersTest::all()
        ->where('workers_id', Auth::user()->id)
        ->sortByDesc('id')
        ->simplePaginate(5);
        return view('worker.inbox.index', compact('workers_test'));
//this is view
{{ $workers_test->links() }}

Is there any way to fix this? thanks

Edgy left a reply on How To Insert To Database Including Break Spaces Or Break Line?

I Figure out

{{ !! nl2br(e($content)) !! }}

Edgy started a new conversation How To Insert To Database Including Break Spaces Or Break Line?

Hi guys, how do I input/output it to database? Everytime I store to database and fetch it, break line doesn't include:

//This is the problem
1. Test 1 2. Test 2 3. Test 3

I want to insert/show like this

1. Test 1
2. Test 2
3. Test 3

Any tips?t Here are my codes:

{!! Form::text('test-area', null, array('placeholder' => 'Thesis Name','class' => 'form-control')) !!}
ThesisTest::create([

        'test-area' => $request->test-area,
]);

P.S. I tried to put nl2br($content) but it shows like these:

1. Test 1 <br />
2. Test 2 <br />
3. Test 3 <br />

Thanks

Edgy left a reply on Passing Variables To Multiple Views

I am not sure if this is my best practise, but I put the

public function show($id)
    {   
$inbox_test = InboxMail::all()
}

to show controller

Edgy started a new conversation Passing Variables To Multiple Views

Hi guys, I need some help and I am confused right now. How do I pass the variable from Controller to different views like index.blade.php and show.blade.php ? Here is the code:

public function index()
    {
    $workers_test = WorkersApplication::all()
    $inbox_test = InboxMail::all()
    

return view('employer.inbox.index', compact('workers_test', 'inbox_test'));
// in return view, I wanted to pass the variable to `employer.inbox.show` but when I tried to add, I got error

// I also read the view::composer documentation, but it doesnt help
}

Thanks guys

EDIT: I paste the $inbox_test = InboxMail::all() to show, is this a best practise?

public function show($id)
    {   
$inbox_test = InboxMail::all()
}

Edgy left a reply on Laravel Query Builder To Eloquent

@tisuchi Thank you, this works

Edgy started a new conversation Laravel Query Builder To Eloquent

Hi guys, I am bit confused in eloquent, is there any way to convert this code to eloquent? I have 2 tables, workers_application and workers Thank you guys.

$thesis_test = WorkersApplication::join('workers', 'workers.id', '=', 'workers_applications.workers_id')
    ->where('employers_id', Auth::user()->id)
    ->orderBy('employers_jobs_id', 'desc')->get();
12 Dec
1 year ago

Edgy started a new conversation Auth User In Query, Is This Also Good Practise?

Hi guys, I have a quick question. is this a good practise?

$test = WorkersTest::where('workers_id', Auth::user()->id)->get();

basically this is a query where is only select based on their login auth::user is this a good practise?

Thank you

28 Nov
1 year ago

Edgy started a new conversation Eloquent Relationship Or Query Builder For 3 Relational Tables?

Hi guys, I have 3 tables namely, workers_messages jobs and employers under workers_message have jobs_idcolumn. while jobs have employers_id .

I am creating like a inbox page, so I am the employer and I will get the records from workers_message. The relation is simple: workers_message.jobs_id -> jobs.employers_id -> employers

My question is, it is recommended to code this with Eloquent:Relationship? or Query Builder (like Inner Join)? I will expect to receive like 100 messages per jobs, which are recommended? Thanks

27 Nov
1 year ago

Edgy left a reply on How Can I Store The ID Of The Row Automatically?

Thank you @Stratos

I include the form.blade to show.blade and works.. Thank you so much

Edgy left a reply on How Can I Store The ID Of The Row Automatically?

Hi @Stratos

could you help me how to pass to multiple views? Thanks

 public function show($id)
    {
        $jobs = EmployersJobs::findOrFail($id);
        return view('employer.jobs.show',compact('jobs'));
      //  return view('employer.jobs.show', 'employer.jobs.form', compact('jobs'));
    }

Edgy left a reply on How Can I Store The ID Of The Row Automatically?

HI @Stratos

I am using e Collective Form in view. I tried to put the <input type="hidden" value="{{ $jobs->id }}" name="job_id"> and shows error undefined variable is there any alternative for this? Thanks

//form.blade.php
 <strong>Cover Title:</strong>
            {!! Form::text('workers_cover_title', null, array('placeholder' => 'Cover Title','class' => 'form-control')) !!}
        </div>
        <strong>Cover Letter:</strong>
            {!! Form::textarea('workers_message', null, array('placeholder' => 'Cover Letter','class' => 'form-control')) !!}


             <strong>Expected Salary:</strong>
            {!! Form::text('workers_expected_salary', null, array('placeholder' => 'Expected Salary','class' => 'form-control')) !!}

Edgy left a reply on How Can I Store The ID Of The Row Automatically?

Hi @martinbean

the ID of the employers_jobs. I updated my question because of lack of information, is that possible?

Edgy started a new conversation How Can I Store The ID Of The Row Automatically?

Hi Guys, how can I add or store idof the row automatically?

Here is the scenario. I have a button, after clicking the button, it will redirect to form and submit button. the form have a cover letter and message, but it is possible that after I hit the button, the ID of that row will also store?

I have 2 tables employers_jobs and workers_applications. Inside employers_jobs is the list of jobs, while workers_applications is the list of applicants. Thanks

//This is Controller
public function index()
    {
        $jobs = EmployersJobs::latest()->paginate(5);
        return view('worker.jobs.index',compact('jobs'))
            ->with('i', (request()->input('page', 1) - 1) * 5);
    }

public function show($id)
    {
        $jobs = EmployersJobs::findOrFail($id);
        return view('worker.jobs.show',compact('jobs'));
    }

public function store(Request $request)
    {
 
        request()->validate([

            // 'workers_message' => 'required',
        ]);
        

        WorkersApplication::create([

        'workers_message' => $request->workers_message,
        'workers_cover_title' => $request->workers_cover_title,
        'workers_expected_salary' => $request->workers_expected_salary,
        'workers_id' => Auth::user()->id,
    //'employers_job_id' => $jobs->id,
        

        ]);

        return redirect()->route('worker.jobs.index')
                        ->with('success',' Thesis Test was created successfully');
    }
//View (Not sure if this will helps but I have a button `Apply` )
//index.blade.php
 @foreach ($jobs as $job)
    <tr>
        <td>{{ $job->id }}</td>
        <td>{{ $job->employers_name}}</td>
        <td>{{ $job->employers_job_title}}</td>
        <td>{{ $job->employers_job_summary}}</td>
        <td>{{ $job->employers_job_salary}}</td>
        <td>{{ $job->employers_job_location}}</td>
        <td>
          
            <a class="btn btn-info" href="{{ route('worker.jobs.create',$job->id) }}"> Apply Now </a>
        </td>
    </tr>
    @endforeach
25 Nov
1 year ago

Edgy left a reply on Query Builder To Eloquent Relationship

Hi @tykus

I am thinking about that code because its easy to read and updated, and I will try to add paginate(10) because paginate in query builder is not working.

maybe I will try to learn the eager load.

Thanks

Edgy started a new conversation Query Builder To Eloquent Relationship

Hi guys, is this possible to convert this to Eloquent relationship? (inner join) Thanks

  $jobs = DB::table('employers')
        ->join('employers_jobs', 'employer_id', '=', 'employers.id')
        ->get();
18 Nov
1 year ago

Edgy left a reply on Relationship : Lots Of ID From Database

@shez1983

Hi, I want to show in the index where you see the list of jobs and see the list of who are the employer.

Example:

| employer_id |  Summary |
| 1 | Summary 1 |
| 2 | Summary2 |
| 3 | Summary3 |

then it will show like this

|Employer name | Summary |
| Edgy | Summary 1 |
| Micho | Summary2 |
| Melone | Summary3 |

Edgy started a new conversation Relationship : Lots Of ID From Database

Hi guys,

I am looking ways to dynamically generate ID from many relationships. I have lots in database. My Main problem is how do I replace the find() and dynamically output it to my view? $employerJobs = Employer::find(1)->EmployersJobs; it's like find(1) find(2)... and so on.

// EmployersJobController

public function index()
    {
        $jobs = EmployersJobs::orderBy('id','desc')->paginate(10);
    $employerJobs = Employer::find(1)->EmployersJobs; // How can I dynamically replace the find()?;
    return view('employer.jobs.index',compact('jobs', 'employerJobs', 'employer'))
            ->with('i', (request()->input('page', 1) - 1) * 5);
    }
// EmployersJobs Model
public function Employer(){

        // return $this->belongsTo(Employer::class);
    return $this->hasMany(Employer::class,'id');
    }
// Employer Model
 public function EmployersJobs(){

        // return $this->hasMany(EmployersJobs::class);
       return $this->hasMany(EmployersJobs::class,'employer_id');
    }
// View
@foreach ($jobs as $job)
<td>{{$employerJob->employers_name}}</td>

Not sure if this is the best practice, but if you have a better idea, feel free to recommend me. Thanks

Edgy left a reply on How Do I Insert My Auth::user Together With Form, In A Single Row

Hi @Snapey

Thank you very much, it works now.

I have future plans for it and I just wanted to test it and go to the next step relationship, I might use join or they called 'relationship' like inserting the user_id and match it from users. I am not sure if this is the best practice.

Cheers

Edgy started a new conversation How Do I Insert My Auth::user Together With Form, In A Single Row

After I hit the submit buttom from my form, It always insert into 2 rows. is there any way to insert the auth::user in a same row with form?

Here is the error, example:

id  | name   | example summary |
1    | Edgy     |                         |
2   |                |   Edgy Description |    

it should be

id  | name   | example summary |
1    | Edgy     |  Edgy Description  |
// controller
public function store(Request $request)
    {
 
        request()->validate([
            // 'employers_name' => 'required',
            'employers_job_title' => 'required',
            'employers_job_summary' => 'required',
        ]);
        
        EmployersJobs::create($request->all());
        $test_name = new EmployersJobs;
        $test_name->employers_name = Auth::user()->name;
        $test_name->save();
        return redirect()->route('employer.jobs.index')
                        ->with('success','Article created successfully');
    }
// form.blade.php

<div class="row">
    <div class="col-xs-12 col-sm-12 col-md-12">
        <div class="form-group">

          <!--   <strong>Employers Name:</strong>
            {!! Form::text('employers_name', null, array('placeholder' => 'Employers Name','class' => 'form-control')) !!}
        </div> -->

    </div>
    <div class="col-xs-12 col-sm-12 col-md-12">
        <div class="form-group">
            <strong>Job Title:</strong>
            {!! Form::text('employers_job_title', null, array('placeholder' => 'Job Title','class' => 'form-control')) !!}
        </div>
        <strong>Job Summary:</strong>
            {!! Form::textarea('employers_job_summary', null, array('placeholder' => 'Job Summary','class' => 'form-control')) !!}


             <strong>Salary:</strong>
            {!! Form::text('employers_job_salary', null, array('placeholder' => 'Salary','class' => 'form-control')) !!}

             <strong>Location:</strong>
            {!! Form::text('employers_job_location', null, array('placeholder' => 'Location','class' => 'form-control')) !!}
    </div>

   <div class="col-xs-12 col-sm-12 col-md-12 text-center">
            <button type="submit" class="btn btn-primary">Submit</button>
    </div>
</div>



 
17 Nov
1 year ago

Edgy started a new conversation How To Put Authenticate In Different Page Using Hesto MultiAuth Package

Hi guys, I am working for my thesis project, but I need some help because I cant figure out and really confused right now on how to fix this. I have a multi-auth package called Hesto Multi Auth and I have 2 auths, EmployerAuth and the other one. I wanted to make /employer/~ to authenticate, example: /employer/profile/ or let say /employer/job/ and it requires to login before accessing this pages. as of now, the only authenticated is /employer/home/ which is also included in default packages. Could someone guide me to fix this problem? the guard name is employer Thanks mate.

// This is Controller
Route::group(['prefix' => 'employer'], function () {

    Route::get   ('jobs/create','[email protected]')->name('employer.jobs.create');
    Route::get   ('jobs/{job}/edit', '[email protected]')->name('employer.jobs.edit');
    Route::get   ('jobs/{job}', '[email protected]')->name('employer.jobs.show');
    Route::post  ('jobs', '[email protected]')->name('employer.jobs.store');
    Route::get   ('jobs','[email protected]')->name('employer.jobs.index');
    Route::delete('jobs/{job}', '[email protected]')->name('employer.jobs.destroy');
    Route::match(array('PUT', 'PATCH'), "jobs/{job}", array(
          'uses' => '[email protected]',
          'as' => 'employer.jobs.update'
    ));
});
// routes/employer.php

<?php

Route::get('/home', function () {
    $users[] = Auth::user();
    $users[] = Auth::guard()->user();
    $users[] = Auth::guard('employer')->user();

    //dd($users);

    return view('employer.home');
})->name('home');

If I missed some codes, please let me know.. Thanks