Snapey

Snapey

at Novate / Microlise

Mansfield

Hire Me

Member Since 4 Years Ago

Experience Points 1,090,675
Experience
Level
Lessons Completed 977
Lessons
Completed
Best Reply Awards 1564
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.

09 Dec
19 hours ago

Snapey left a reply on Adding More Logic To Laravel Register Method

check that you have 'word' in your $fillable array on User model ?

Does the user get created without this column?

Have you checked the network request in your browser tools to be sure the correct fields are being passed?

Snapey left a reply on Return Redirect From Function Called By Controller - What Am I Doing Wrong?

You could wrap all your functions in a try-catch block and then throw your own exceptions in your functions when something goes wrong?

Snapey left a reply on Syntax Error : "syntax Error, Unexpected 'view' (T_STRING)"

track back from view in your controller. Somewhere just before this, you are missing a closing brace or semicolon

Snapey left a reply on Post Reloads The Page

This

'domain' => env('SESSION_DOMAIN', null),

sets the session.domain config element to whatever is SESSION_DOMAIN in .env or null if it does not say

We've had some people in the past set this to be something really specific which then causes session identity issues. But not in your case.. so, something else...

Snapey left a reply on Form Validation Errors (log Out User) On Large Input

how long is very long?

are you logged out or do you just get an unauthenticated response? ( if you go back and change pages, are you still logged in?)

Snapey left a reply on Post Reloads The Page

sorry, I should have asked. This will pull through domain from .env . Is it present there?

Snapey left a reply on How To Apply Security Updates

Composer update will bring in any updates to the version you are on, which will be typically non-breaking patch updates.

In composer.json, you will have the laravel version specified like 5.7.* which means that you can run update and get the latest version of 5.7 and all its dependencies equally are checked for new versions.

Running Composer update will also create a composer.lock file. This creates the precise package versions being used. This is created so that you can do a composer install and get all the exact same versions on another build (eg on production).

If moving versions then the Laravel release number would be bumped, eg 5.6.* to 5.7.* and all the dependencies imported. This might introduce some breaking changes - depending on what features of the framework you are using.

Snapey left a reply on Post Reloads The Page

have you changed anything in the default config/sessions.php file, and in particular, the domain

Snapey left a reply on Laravel Show Nearest Products First ?

have a look for haversine formula. This will allow you to caculate the distance between two pairs of coordinates

You may also find tutorials under the topic of 'store finder'

Snapey left a reply on Make Public Sub-Directory To Follow DocumentRoot Path

Laravel uses index.php as its front end route. All traffic needs to pass through this.

index.php resides in public folder

Your document root needs to be the public folder.. not a specific php file. I dont get what you are doing trying to publish auth.php

I think you are missing a key concept somewhere, and if I were you I would start with a basic framework ( no changes on your part), and get that working on your apache server

08 Dec
1 day ago

Snapey left a reply on Post Reloads The Page

When looking at Laravel Debugbar, on the right hand side there you might see #1 or #2 Debugbar keeps track of multiple requests. #1 will be the POST request and #2 will be the redirect.

Failure to create sessions can be caused by permissions on the storage folder. Have a look in the storage/framework/sessions folder to see if any sessions are being created.

Snapey left a reply on Uploaded Multiple File Function GetClientOriginalName() On Null

format code by putting three backticks ``` on its own line before and after each block

(see the instructions at the bottom of the comment box when posting)

Snapey left a reply on Post Reloads The Page

Install Laravel debugbar. It will let you check things like the session to see if anything is being set. Its only a 3 minute install.

Snapey left a reply on Remember Selected Files After Choosing New One..

Have a look at dropzone.js. This should allow you to drag files one by one into the control and send them immediately to the server, or on form submission.

https://www.dropzonejs.com/

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

@fatima1 please inducate if your question is solved in your duplicate question.... otherwise people waste their tim answering your question

Snapey left a reply on Uploaded Multiple File Function GetClientOriginalName() On Null

glad if you sorted it.

please learn to format code properly in your questions

Snapey left a reply on Remember Selected Files After Choosing New One..

not with standard form controls, Thats not how they work.

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

we imagine that the author of the tutorial got their code to wotk, therefore any issue is with your copying of the code

Therefore just saying you are doing the same as the tutorial is not a response that is going to help us help you

the code that is failing

if($request->hasfile('filename'))
     {

        foreach($request->file('filename') as $file)
        {
            $name=$file->getClientOriginalName();

is the first use of the file object so, it could be any of the things @tykus mentioned

Snapey left a reply on Auth::attempt() Always Returning False.

but no longer checking the password?

Snapey left a reply on Too Many Arguments, Expected Arguments "command".

it should be double >>

schedule:run >> /dev/null 2>&1

Snapey left a reply on Auth::attempt() Always Returning False.

and has that worked for you?

Snapey left a reply on Make Public Sub-Directory To Follow DocumentRoot Path

copy your laravel project to the server and configure apache to serve public as the document root. Don't put code in child folders of public.

There are plenty of tutorials out there for setting apache document root, however the answer depends if you want to use virtual hosts

07 Dec
2 days ago

Snapey left a reply on Auth::attempt() Always Returning False.

it could be that you have not stored the password correctly in the database in the first place

Snapey left a reply on Too Many Arguments, Expected Arguments "command".

do the commands work ok when you run them directly

Snapey left a reply on Too Many Arguments, Expected Arguments "command".

Why are you using wildcards in the path?

Snapey left a reply on Validator::make Does Not Work In LoginController

The login method on the default AuthenticatesUsers trait is not expecting anything to be returned from validateLogin. It is expecting an error to be thrown.

Change to

$request->validate([
  'email' => 'required|string',
  'password' => 'required|string',
  'recaptcha' => ($this->limiter()->attempts($this->throttleKey($request)) >= 3) ? 'required' : 'nullable'
]);

If this does not give you the json response structure you are looking for, I think you will need to do it as you had originally, but throw a validation error rather than just returning.

06 Dec
3 days ago

Snapey left a reply on How To Generate A .txt File With Data From A View

View has a make() function which will return the rendered html

Snapey left a reply on Auth::attempt() Always Returning False.

what? something is lost in translation

Snapey left a reply on Disable Updated_at Time Of Insert

When you insert a new record, it automatically gets the same update_at time as created_at.

What is wrong with that?

Snapey left a reply on Laravel Sereve

Should work with xampp also?

Snapey left a reply on Disable Updated_at Time Of Insert

Explain the scenario more. If you want it disabled for every insert then why have it?

Snapey left a reply on Website Down

You didn't answer... has this site ever worked? Its quite important to know the history.

Snapey left a reply on Disable Updated_at Time Of Insert

You can overwrite the timestamps property for one call.

If it were User model for instance;

    $user = Auth::user();
    $user->timestamps=false;
    $user->last_access = now();
    $user->save();

just an example. The timestamps variable is cleared just for the one request cycle.

Snapey left a reply on Auth::user(); Authentication In Core Php

I think the problem is that you need to learn object oriented programming.

Your example won't know anything about any Laravel classes.

05 Dec
4 days ago

Snapey left a reply on Website Down

@BALINT - So why show it?

Snapey left a reply on Run Laravel Without Storage Permissions

IIS supports virtual hosts, ie, you can have many websites all served by the same IIS install, and all with their own document root. Its just a bit of learning you need to do.

https://support.microsoft.com/en-gb/help/816576/how-to-create-a-new-virtual-server-or-web-site-in-internet-information

Snapey left a reply on Laravel And Gzip... How To?

You would only gzip your public folder assets if you intended to put the files on a floppy disk and send them in the post to a friend who did not have an internet connection.

No, more likely, you want to configure your web server to compress your assets as they are sent to browsers. This is not something you need to do as a build step, you just turn on compression on your web server.

Snapey left a reply on Website Down

You have a project in a folder called GitHub/login?

Has it ever worked?

Snapey left a reply on Form Inside Foreach

You've probably not closed a tag or a quote somewhere.

Forms in foreach loops are very common. Don't let anyone tell you otherwise.

Snapey left a reply on Auth::attempt() Always Returning False.

A common mistake is not adding name="" to the form elements. Easily validated by checking what is in the request.

Snapey left a reply on Run Laravel Without Storage Permissions

First priority is to host your site properly. Only the contents of the public folder should be served by IIS to visitors. If you just point IIS at the Laravel project folder then you will have these sort of issues.

Once again, Document Root = public/

Nothing else.

Snapey left a reply on Laravel Sereve

You need a webserver application. WAMP would probably suit your needs and can be started automatically.

Snapey left a reply on I Can't Access My Profile In Laracast.

I suggest you use the support form at the bottom of the page rather than posting here

Snapey left a reply on Laravel Convert Into Mobile Apps

Have a look at Progressive Web Apps (PWA)

By the way, Laravel is a back-end framework.... its got tools to help you build client side experiences (eg Blade) but thats all it has to do with building client applications.

Snapey left a reply on Split Users And Profiles Into 2 Different Tables

If 98% of the access is by users and 2% by admins then I would make the users table contain all I need to display content to users. Otherwise on every access by a user you are making two calls (or a join) to the database.

Whats the hardship in having a few empty columns for a few users?