nnjeim

nnjeim

Software Engineer at BMBC Premium Solutions

Member Since 1 Year Ago

Experience Points 2,840
Experience
Level
Lessons Completed 25
Lessons
Completed
Best Reply Awards 0
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.

12 Dec
3 days ago

nnjeim left a reply on Boadcast Event

@D9705996 - Hi, i am using pusher. But i would like to initiate a broadcast from a channel class and not from an event class. Is this possible. I am having no error but pusher is not receiving any event update. The documentation only covers a broadcast from the event class.

nnjeim started a new conversation Boadcast Event

I have tried to broadcast from a channel class in vain. any advice here? i have implemented the Illuminate\Contracts\Broadcasting\ShouldBroadcast; and added to broadcastto method. any experience with this to share?

18 Jul
4 months ago

nnjeim started a new conversation Auth Face In Service Provider

I have created a custom provider where i need to access Auth::check() in the register method.

It is turning false. i have also tried to dd Auth::user() and i got a null.

Any luck in doing this?

28 Jun
5 months ago

nnjeim started a new conversation SMS Template In Blade

Hi,

I need your input by sharing the best practice to send sms template (text) from Laravel. Best option would be if i can generate a blade view in text where i can pass variables to it.

Thanks in advance

15 Nov
1 year ago

nnjeim started a new conversation Constructor In Model Class

Hi all,

how to add a constructor is a model extending eloquent class?

i have tried to add a constructor but the fill function stop working properly.

14 Nov
1 year ago

nnjeim left a reply on Passing Data To Event

Hi,

you need to pass this to the closure

Event.$on('lead-created', function(val) {
        this.reminders.count += val // returns undefined, there is a problem
      })

or use the arrow function here

13 Nov
1 year ago

nnjeim left a reply on Session Issue

Hi Talinon,

I did as indicated.

Your doubt was right, no file is created in the sessions directory.

nnjeim left a reply on Session Issue

Hi Talinon,

i have verified all group routes are being attributed Auth and Admin (copy of web) in kernel... the routes are being used in a prefixed group ('admin'). i am attaching here below the kernel definition

'admin' => [
            \App\Http\Middleware\EncryptCookies::class,
            \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
            \Illuminate\Session\Middleware\StartSession::class,
            // \Illuminate\Session\Middleware\AuthenticateSession::class,
            \Illuminate\View\Middleware\ShareErrorsFromSession::class,
            \App\Http\Middleware\VerifyCsrfToken::class,
            \Illuminate\Routing\Middleware\SubstituteBindings::class,
        ],

i am doubting that the issue is related to prefixed routes...

nnjeim left a reply on Session Issue

Hi robrogers3,

i am using scoped controllers.

app\Http\Company\CompanyController is where the session is set.

public function setCompany(Request $request) { $company_id = $request->input('company_id'); $request->session()->forget('company_id'); $request->session()->put('company_id', $company_id);

    return back();
}

but i am trying to use the session setting in blade and in other controllers sessions. other controllers are in different scopes.

in addition i think i need to mention that i am using the database driver, but i also reverted back to the file driver and it didn't fix the problem.

what i am sure of is that in the CompanyController the session is being set correctly because i responsed with session('company_id') and the response was correct.

but calling the session from elsewhere is returning null in the model. sometimes it set it to a value but cannot overwrite.

as u can notice up in the code i am also applying forget to make sure the session attribute is flashed but still this is not helping.

Thanks in advance for the patience you are talking to read all this.

12 Nov
1 year ago

nnjeim left a reply on Session Issue

Hi Talinon,

i have added Session::save() after the put, this does not seem to change the problem. i have returned the session('company_id') from the controller and it is returning correctly when i toggle between different companies.

I discovered that the issue is that the session is returning null in other controllers, models or blade views.

anyone ever encountered something similar?

nnjeim left a reply on Session Issue

Hi robrogers3,

in the submitted for there is a named select element, the select action submits the form to a route controller. I already validated that the selected value is submitted correctly by returning it to the view. It is clear that the problem resides in the session setting. I have read somewhere that this problem is related to scoped routes. Any suggestion here?

11 Nov
1 year ago

nnjeim left a reply on Call Controller Method From Vue

Hi, do you want to download a pdf file, or export the view in pdf?

nnjeim left a reply on Session Issue

Hi and thanks for your replies.

On selector value change I am submitting a form from blade to a route controller.

from JS event.preventDefault(); document.getElementById('set-company-id').submit();

the controller method is as below $request->session()->put('company_id', $company_id); return back();

i am printing in the blade view {{ session('company_id') }}

On the first selector change the value is set to 1 for example then on subsequent changes it remains as 1.

I tried to return the value of company_id from the controller and it was returning correctly.

So i came to the conclusion that the problem is in the session setting.

I also tried to change the session driver from database back to file.... the result remained the same.

nnjeim started a new conversation Session Issue

I am using Laravel 5.4 and i am setting the session at the controller level.

A selector change in blade submits the new value to be set in the session.

following the first request the session variable is not being overritten..

what i am missing here? any hint?

$request->session()->put('company_id', $company_id);