babonday

babonday

Member Since 4 Months Ago

Experience Points
510
Total
Experience

4,490 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.

Level 1
510 XP
16 Aug
1 month ago

babonday left a reply on Clean Code

i cant follow the context of your example but thanks for reply . my fault for not including the view page maybe. i will look at the link.

15 Aug
1 month ago

babonday started a new conversation Clean Code

I've managed to allow a user to edit 3 images in the db with crud methods.

I got it working with the following repetitive code:

$project = image::find($id);

if ($request->hasfile('file_path1') ){ $project->file_path1 = request('file_path1')->store(''); } if ($request->hasfile('file_path2') ){ $project->file_path2 = request('file_path2')->store(''); } if ($request->hasfile('file_path3') ){ $project->file_path3 = request('file_path3')->store(''); }

$project->save();

It works and the user can edit which ever image they please... is there a neater way of doing this so i dont have 3 if statements ? thx

babonday commented on Faking PATCH And DELETE Requests

Followed tuts and all good. struggled to work out what to put in the edit button href = in my app , on the page before the edit function .

i.e in the tuts the route is just typed into the url and doesnt have a button like a real world app.

oh and what happens when you need to select and join other models in the same form like table:images and table:users by foreign id. thx

14 Aug
1 month ago

babonday left a reply on How To Update And Edit A Image In Laravel 5.8

Anyone got the link to how to do this on a laracasts video?

11 Aug
1 month ago

babonday left a reply on Route Issue

watched them many times.. will watch again/ not sure there is a video with crud though...will look again

09 Aug
1 month ago

babonday started a new conversation Route Issue

i have a edit button that wont work with this method (from a tuts )

Edit Property

route =

Route::get('/edit_property_form','[email protected]_form')

can someone help me work out why iam gettting the error : Route [upload.edit_property_form] not defined.

22 Jul
1 month ago

babonday left a reply on Populate A Form For Editing/updating. How?

deprecated now isnt it?

babonday left a reply on Populate A Form For Editing/updating. How?

where are the docs for crud in laracasts etc??? very common thing to want to do . Small things like snapey mentioned, using 'old' so that you dont have to create a fresh edit form...all these things are what newbies need tuts on to work out the 'simple' and time saving stuff.

babonday left a reply on Edit Form In Laravel 5.4

what is this ? give an answer with no context ,or have a missed the start of the thread.?

06 Jul
2 months ago

babonday commented on Basic Routing

where is the lesson on using a number of functions while only being able to load 1 route to a page.

04 Jul
2 months ago

babonday left a reply on How Can I Run Two Functions On Same Url

so you make multi queries in 1 function to get the route to work? Is this a clean way to write reusable code?

22 Jun
2 months ago

babonday left a reply on How Do I Handle Multiple Submit Buttons In A Single Form With Laravel?

@ROBSTAR - i think he means the confusion when you first follow the laracasts.. it implies that laravel is an alternative to php syntax and also a shortcut.. . so you spend ages looking for the magic new way/ shortcut .

...which of course ironically wastes days in time...

babonday left a reply on Form Routes In Laravel 5.2

@CHRISTIANGERDES - why would u not like using facade? iam new to this and the choice is so hard to understand. thx

babonday left a reply on How Do I Handle Multiple Submit Buttons In A Single Form With Laravel?

@MARTINBEAN - what does the route web.php file look like in this example?

Route::post('/search', '[email protected]');

thx

babonday left a reply on How To Acess The Data Without Using Foreach Loop In Blade File

So is the answer, you do always use a foreach on the view? . And use the backend to spit out what you want.

I just wanted the first item on a list on 1 part of the page and foreach the rest of the list on another part of the page. Seems alot of work to have to create a new query to just get the first item

19 Jun
3 months ago

babonday left a reply on Real Estate

i dont understand. There are millions of real estate sites and no templates.

How do you go about doing a product search for shop...are these all hand coded or can you get scripts/ packages for this ?

The search function required to allow user to search a property is so common i cant see why its not a common script to get hold of.

thx

babonday left a reply on Complex Search

@JOSHWILLEY - Hi, is there a package out there for this. Imagine there are millions of real estate sites... how are they all sorting the results of searched properties. I ve even read javascript might be the way to go? i.e. i want to click buttons and the results sort accordingly by price, date listed (oldest/ newest) . what is the logic most devs use to fix this common task? thx

09 May
4 months ago

babonday left a reply on How Do You Handle A User When Their Session Timesout In Laravel 5

Many thanks for this and sorry for late reply. I will work through your example app.

25 Apr
4 months ago

babonday left a reply on How Do You Handle A User When Their Session Timesout In Laravel 5

@SNAPEY - "This is because you are still logged in"

Many thanks for your logic help. I set the refresh to kick in after the user was logged out by the session and it took the user back to the login page....

meta http-equiv="refresh" content="7300; {{ route('login') }}"

i am sure laravel has a much nicer way of dealing with a user by using a class/ or event listener but this will have to do for now.

babonday left a reply on How Do You Handle A User When Their Session Timesout In Laravel 5

many thanks for testing. i have version 5.7.13

' I then clicked on 3 for page 3, it took me back to the login page. '' this is what i would expect...

When i test with session set to 1 minute it does log user out but nothing in the nav bar changes , the user can then go to another page and thats when the navbar says they are logged out..

it doesnt redirect them back to the login page.

24 Apr
4 months ago

babonday left a reply on How Do You Handle A User When Their Session Timesout In Laravel 5

@JLRDW - could i at least change the colour of the 'login' title in the navbar when session times out? maybe that would allow user to see they have logged out..

babonday left a reply on How Do You Handle A User When Their Session Timesout In Laravel 5

@SNAPEY - what happens to your users if they leave their desks and return after session has timed out? what do they see? be interested to know for experience. thx

babonday left a reply on How Do You Handle A User When Their Session Timesout In Laravel 5

@JLRDW - maybe this is the way to go...never let them leave!! i wont be handling any personal details but i was hoping to learn how say banks log users out after say 10 minutes and return them to the login page again... thought it would be fun to learn this... i was very wrong.

babonday left a reply on How Do You Handle A User When Their Session Timesout In Laravel 5

@SNAPEY - i give up... screw the user.. or should i say screw the logged/timed out user fumbling around in my app...

babonday left a reply on How Do You Handle A User When Their Session Timesout In Laravel 5

@JLRDW - No its nothing to do with a user not using the app correctly. its about user experience and it looking crappy.

please click on the links i supplied..others are asking the same question.

even if i can get a modal to appear with a button that returns the user back to the login page that would be good.

i still need to know how to active the modal on session time out...

babonday left a reply on How Do You Handle A User When Their Session Timesout In Laravel 5

@CODINGISEASY - has anyone got an example website written in laravel so i can login and see how they handle it? does this site kick you out after a few hours?

i see questions like mine all over the web but dont understand the answers at all...

https://stackoverflow.com/questions/47274200/redirect-user-to-login-page-when-session-expires-in-laravel

https://laracasts.com/discuss/channels/laravel/redirect-to-login-page-after-session-timeout

babonday left a reply on How Do You Handle A User When Their Session Timesout In Laravel 5

@JLRDW - thanks. just to repeat my issue in case anyone has written anything to help me.

At moment user times out and nothing happens in the app... the user can even click a button or start a form..at that point the navbar changes to 'logged out' but still takes the user to the form...

have i set up something wrong or does no one see the issue that if the user doesnt notice the logged out status and fills a form out he will be pissed? thx

babonday left a reply on How Do You Handle A User When Their Session Timesout In Laravel 5

@SNAPEY - thanks for response, kind of appreciate it but still confused.

i still havent worked out why iam even asking this question and no one else seems to have an issue with leaving the user in the app logged out.. must be me.

i want my app to return users to the login page after the session times out.. i dont care if they go for lunch and forget..i want them to return to a home page asking them to log back in after...

did you answer that or have i overlooked it? thx

babonday left a reply on How Do You Handle A User When Their Session Timesout In Laravel 5

@JLRDW - thx,, i never trust a user either..thats why i want them auto logged out and returned to a home page so they know they have been logged out.. my logic must be all wrong... worrying as seems very logical to me that if a user leaves their pc for a while be sensible to return them to a safe page ( log back in page ) /

Redirect on session time out....? any ideas.

babonday left a reply on How Do You Handle A User When Their Session Timesout In Laravel 5

@BOBBYBOUWMANN - 'In general I either set a higher session timeout or don't do anything at all.'

am i over thinking this then? i use an app at work written in .net and i get error message every morning ..i think its crappy and this is a £1million turnover provider///

maybe iam over thinking it but i dont think so.

babonday left a reply on How Do You Handle A User When Their Session Timesout In Laravel 5

thx bobby , when you say 'don't do anything at all ' really? the user turns into unauthenticated guest then but is in the app and so if clicks on anything they get a massive error page.... i cant see how this is good? also thanks for the package idea but iam sure laravel must have a way to do this simply..ive read about middleware.. so in english code i want to:

when session times out

redirect user to login page

or

have a modal block the app until they log back in...

iam that desperate iam happy to use my redirect again if anyone can tell me the eloquent way to get the user back to the login page .

ive tried this but it just takes user back to home page not login page ( why?)

'<'meta http-equiv="refresh" content="5; {{ route('login') }}" '/>'

babonday started a new conversation How Do You Handle A User When Their Session Timesout In Laravel 5

wow sorry to ask this question but it seems everyone asks this question on here or stack overflow at very different times in their journey.. i must be looking in the wrong place in the docs not to find something so simple.

I am at the place when the session times out after the preset 120 mins. At the moment nothing happens until the user clicks something and they get an error or they realise they have been logged out.

in old apps i used to redirect with a meta http-equiv="refresh" content="5; locahost/login_page}"

i realise this is a bit of a blunt way to treat a user as they may lose their work but i cant work out where to start in laravel.. i must have read 20 threads but they seem further along then me in a) the logic and b) what i should do...

hope this is clear.

babonday left a reply on Session Lifetime

ha, 'check the docs... ' thx for the advice cronix. i have a rare form of doc blindness . I see the words but they dont make sense. (maybe i shouldnt code) For this reason rather then the car analogy, its more like reading a phone book in the hope i may need to ring one of the numbers one day.

i've sorted the .env file part out now anyway.

Where in the docs is the part about sending the user back to the login page once the session times out i.e. when user is inactive for 120 mins ?

Have laravel ever thought about setting up a phone help line? i'd pay for that. :)

23 Apr
4 months ago

babonday left a reply on Session Lifetime

@BASHY - Not sure why but session.php does nothing for me. I had to change the lifetime value in my .env file for the timer to take effect.

another 2 hours wasted .

and now a few more hours working out how to redirect timed out user to the login page ! thought this stuff was out the box?

babonday left a reply on Laravel 5.4 Auth Session Timeout

yes, like jim_10 says in his quickfire 1 line of code .. i had to change the SESSION_LIFETIME in the .env file .. and not change it in the

config->session.php file like most threads on here say to do.

babonday left a reply on Session Lifetime

@BASHY - doesnt work:

'lifetime' => env('SESSION_LIFETIME' , 1),

iam trying to test so i can then try and redirect the user back to login page after 1 minute .. any ideas why this doesnt work?

babonday left a reply on How To Redirect To Login Page In Laravel 5.2 On Session Timeout?

answer maybe correct but some context be helpful...why do you have to create a db table to get the session timeout to work?

Also i changed the time value session_lifetime in my .env file and it worked... didnt work in the session.php file for me either...

still trying to work out how to redirect user to login page after session time out....

babonday left a reply on Redirect User To Login Page When Session Expires

@DLUBBAT -

iam confused about this question... i would have thought , not telling a user his session timed out so they carry on working until they realise they have no session, would be high on the experience list? what is everyone else doing to inform users their session timed out?