19 Best Reply Awards

  • Member Since 11 Months Ago
  • 245 Lessons Completed
  • 0 Favorites

15th March, 2018

Thyrosis left a reply on Protected Registration • 2 days ago

Seeing as the error message is

Missing required parameters for [Route: register] [URI: register/{registration_token}].

The most logical explanation is that you're calling /register in your browser when you want to register. Either by going to the route explicitly by typing it in your browser, or by linking to it via de route-helper ( route('register') ).

You need to pass through the token though. So the url would be


Or using the route helper with the parameter for the token:

route('register', 'dhebsoxhaleofiend')

14th March, 2018

Thyrosis left a reply on Laravel And Git • 2 days ago

Yes, I've experienced this before. Never found a solution, unfortunately. Using a different terminal seems to do the trick though.

6th March, 2018

Thyrosis left a reply on Not Working In Live Server Ubuntu • 1 week ago

You're very welcome, glad you got it to work!

Thyrosis left a reply on Not Working In Live Server Ubuntu • 1 week ago

@vinoth06 you could use a telnet session from your local machine to try and reach it. I'm guessing this is not the issue, but it can't hurt to check.

You can do it with any terminal in Windows (needs telnet enabled through the extra Windows options), Linux or Mac:

telnet yourhostnameorip 4000

It should look like this:

// This one doesn't connect
$ telnet 4000

// This one does connect
$ telnet 80
Connected to
Escape character is '^]'.

Thyrosis left a reply on Not Working In Live Server Ubuntu • 1 week ago

Assuming this is a remote Ubuntu server, could it be that the firewall doesn't allow connections on port 4000? Node could listen all that it wants, but if this requests don't even get to the server, nothing will happen.

5th March, 2018

Thyrosis left a reply on Request->all() DOS Attack ? • 1 week ago

You're URI will exceed the limit, both that of the amount of GET parameters as well as the header size.

Also, just to clarify, this is not a DOS attack. Its just a very heavy request that the server will need to take care of, but it won't slow it down much.

If you would loop though the parameters the other way, it would be a DOS, so

Url?id=1 Url?id=2 ... Url?id=999999

You just have to set curl to not wait for the answer, otherwise you'll be slowing yourself down as much as the other.

4th March, 2018

Thyrosis left a reply on Laravel From Scratch Never More? • 1 week ago

I think he might record the whole series and then post it all at once. I caught that somewhere on one of his podcasts, but it might have been an older one...

Then again, there was a 'from scratch' on 5.4, with a 'whats new' on 5.5. I expect that, with the lack of major feature changes in 5.6, it only warrants a few episodes , not a complete series.

But hey, we'll just have to wait and see I guess. ?

Thyrosis left a reply on Laracasts - Email On New Series? • 1 week ago

I totally agree! I don't often browse the site randomly. I've watched or subscribed to the courses I want to see and watch videos from the 'series updated' emails.

I've actually wondered myself whether there was a 'new series started' email, but now I have the answer. +1 for the feature request!

28th February, 2018

Thyrosis left a reply on How To Auto Refresh A Div On X Seconds • 2 weeks ago

Sounds like just the task for broadcasting. Have a look at this series here on Laracasts:

You technically could use an AJAX call to fetch the info you need, update the diff and the sleep for 5 seconds. But if you want it 'the Laravel way', check out that serie.

23rd February, 2018

Thyrosis left a reply on Considerations For Production Server (Not Forge) • 3 weeks ago

If you're considering running your own server and are able to manage it yourself, Hetzner might be a good option. They're cheap (€5 for 2cpu 4gb ram) and I never had an issue with them while using their server.

Here's the link:

17th February, 2018

Thyrosis left a reply on Laravel X Nginx X Webuzo • 1 month ago

I don't have any experience with Webuzo, but quite a bit with DirectAdmin (another control panel). Editing something directly on the server is never a good idea, the control panel will in fact rewrite its configurations from its own stock on every change.

Regarding Nginx, Webuzo should take care of that for you and you won't need to edit anything to get multiple sites working. If it doesn't, something in their implementation of Nginx seems to be off. Because then it's not just Laravel, but all sites.

8th February, 2018

Thyrosis left a reply on Upload Large Files • 1 month ago

Which ini values did you change? I know PHP has a few different values which are related to uploading files and their sizes.

7th February, 2018

Thyrosis left a reply on Why All Videos Can't Play? • 1 month ago

I haven't got any issues on Edge nor FireFox, can just watch the videos.

Don't know what else to tell you as the videos are hosted at Vimeo with a privacy setting which blocks direct play, so you can't test if the connection to Vimeo itself works for you. Maybe try a different browser/device/internet connection and see if that works?

Thyrosis left a reply on Activate A Member When A Date Arrives • 1 month ago

Then scheduling is your way forward. Something like this in the App\Console\Kernel file:

    protected function schedule(Schedule $schedule)
        $schedule->call(function () {
            // There is a much better way to do this, but my brain doesn't want to cooperate today
            foreach (App\User::where('status', 0)->where('activation_date', { today })->get() as $user) {
                $user->update(['status' => 1]);

6th February, 2018

Thyrosis left a reply on Activate A Member When A Date Arrives • 1 month ago

Is there a specific time that the user needs to get activated? Or is it just 'on that day'?

You could use the task scheduler for these kind of things. Just use the daily() frequency and the task will get executed every day at midnight.

From there, it is just a matter of finding all users with a activation date of today and status is 0 and update their status.

Find the task scheduling docs here:

2nd February, 2018

Thyrosis left a reply on How To Make A Menu Menu With Data From The Database • 1 month ago

I would suggest pulling up the menu from cache. Like build it once and rememberForever, then only clear the value when you change the menu itself.

You can then include the variable using a view composer in your AppServiceProvider.

I would show you code, but I'm using my phone at the moment and it doesn't like doing that.

1st February, 2018

Thyrosis left a reply on Is It Advisable To Use The Default Functions Of Make:auth? • 1 month ago

I wonder why you would NOT rely on the default functionality which comes built in with the framework. I can think of two situations:

A. You're using a different authentication package, in which case you're relying on their functionality B. You're required to create your own authentication system as the default is so much different than what you need that it would make more sense to create one from scratch instead of overloading the default.

In both cases you will know why you are not using the make:auth that arrived with Laravel. In all other cases, you'll need convincing arguments for yourself to make the decision.

30th January, 2018

Thyrosis left a reply on Uploading Finished Project To Your Server - Confusing. • 1 month ago

If you have composer available on your server, it should just be a matter of

  • uploading all your files (apart from the vendor folder) to the ftp
  • run composer update
  • modify the uploaded .env to reflect the servers environment, so change the database settings for instance.

If would help to know which steps you did manage and which you didn't and also which errors occurred.

Thyrosis left a reply on How To Set Default Picture If User Doesn't Upload The Picture?? • 1 month ago

@anandmainali5 thats true. But, now in your blade file, you still need an if statement to check if $user->image is set.

You could avoid this extra and unnecessary control structure by returning the default path in your mutator already. That way, in blade you can just echo out the image url and don't have to extra check.

Thyrosis left a reply on How To Set Default Picture If User Doesn't Upload The Picture?? • 1 month ago

I think the mutator might be your issue here.

Because now, every user will have 'Images/logo/' as their image attribute, so nobody will fall back to your default picture. After all, $user->image will always at least contain the start of that path.

You could make it a function, rather then a mutator.

''' Function image() { If ($this->image) { return imagepath; }

Return defaultimagepath; }

$user->image(); '''

20th January, 2018

Thyrosis left a reply on Route Exists But Page Not Found • 1 month ago

If I had to guess, id say the firstOrFail. When one student hasn't got any submittedAnswers stored, the fail will ensure the whole method fails and could possibly show a page not found error.

16th January, 2018

Thyrosis left a reply on Route Not Working: Page Not Found L5.5 • 2 months ago

You should move your {slug} route to the bottom of the routes file. Because now, /home and /test don't even get to the routes you defined, they are seen as slugs for your [email protected] route.

By moving that slug route down, the router will first check if the url is home or test before tossing it to the variable slug route.

Thyrosis left a reply on Send Email (password Reset) • 2 months ago

For the record: I seem to recall OVH as VPS provider, which means you'll probably have your own (virtual) server over there. That means you should be able to create your own email addresses using your control panel or on the server directly. A control panel like directadmin or cancel ill be easiest.

5th January, 2018

Thyrosis left a reply on What Does This Part In The Controller Do? • 2 months ago

It's exactly what you say it is: A comment. Its sole purpose is to comment upon what the controller does.

Highlighting will depend on editor used I guess.

Thyrosis left a reply on Stripped Tags On Live Server • 2 months ago

Are your two environments the same? Same php version, composer update on both ends, same OS?

I've run into a few issues myself where my local environment is windows and it works perfectly, but once I push it to my remote Linux servers random error occur. Usually due to the case sensitivity actually.

Thyrosis left a reply on Stopping Reset Password User From Entering In Someone Else Email • 2 months ago

Was just going to suggest that as well. In the email, link to an url with some secret token, which you store in the db for that user. In that case, you don't even have to ask for the users email address when he enters a new password, as it's linked to a specific token.

4th January, 2018

Thyrosis left a reply on Stopping Reset Password User From Entering In Someone Else Email • 2 months ago

I'm confused.

A password reset is done by a not logged in user, right? Because if I am logged in, why would I request a password reset?

In any case, there are two options. Either the user is in fact logged in, in which case you can just validate the inputted email address against the currently authenticated users email address.

Or, if the user is not logged in, he can enter an email address to request a password reset. If it's his own: Happy days. If it's not his own: Bad user! This is not something you can pretend, unless you ask something only the user knows, like... A password? ;)

In cases like these, you would send an email to the entered email address with a link to click. Did you request a reset? Click the link! Didn't you? Hmm, some shady stuff going on.

2nd January, 2018

Thyrosis left a reply on Free And Easy To Integrate Wysiwyg For Laravel With Image File Browser • 2 months ago

Kinda off topic now you've changed the scope of the question, but...

TinyMCE is free to use. Only if you use the Cloud version and not register it, you'll see that message. You can still download the Community version and integrate it in your project without having to pay for it. Check out

But, indeed, wanting a file uploader requires either a (paid) plug-in or a different editor. I'm curious to see if someone knows of one which offers the file upload free of charge and is a decent editor, because I've been looking for one for a while too.

Thyrosis left a reply on HTML Line Break Interpretation Saved In SQL, From Textarea • 2 months ago

When it's stored in the DB with the BR-tag, you can then get the text to display properly using {!! $variable !!} instead of {{ $variable }}.

If you use {{}}, Blade will automatically turn all the HTML-tags to safe, displayable codes like > and <.

Using {!! !!} instead, Blade will not convert your HTML tags and the text will display as you intended.

31st December, 2017

Thyrosis left a reply on Relationship: Property [inbox_message] Does Not Exist On This Collection Instance. • 2 months ago

Well, it makes sense, seeing as inboxmails is a hasMany relationship.

The code Snapey suggested should do what you want then, doesn't it? Because of the collection of inboxMails it takes the first one of that collection.

Thyrosis left a reply on .dev As New GTLD • 2 months ago

Personally, I use

  • projectname.local for my local development environment
  • for staging area, so client can check on status and give a thumbs up for release
  • for the live site (obviously)

That way, It's always clear where I'm browsing. And the 'local' extension isn't released I think, so it doesn't collide with anything.

26th December, 2017

Thyrosis left a reply on Password Reset - Email Never Reaches The Recipient. • 2 months ago

Do you have access to the servers mail logs? Because those would be the next step to check. Laravel connects via SMTP to Details of their communication are stored in the maillogs (like EXIM or Postfix) on that server.

Then will connect to the recipients mailservers, their communication is also stored in those maillogs.

So each step is logged. If Laravel says its sent the message, that should mean that its received a 250 OK from There is your next clue for debugging the issue.

25th December, 2017

Thyrosis left a reply on Is TDD A Must To Have • 2 months ago

It depends on the type of project and who you're working it for.

When working on a personal project, it's not necessary but having tests could help you down the road.

When working for a company on a project that will be deployed and possibly even maintained by others, you should. I wish the developers at the company I work had implemented TDD when they developed the current application we use. Both of the developers have moved on and have been replaced, but they'd are not familiar with code base at all. Every change they do make results in something else not working. If there had been tests, at least there would have been a simple first layer of 'defence'.

22nd December, 2017

Thyrosis left a reply on Send Form Cross-domain • 2 months ago

CSRF stands for cross site request forgery, so the name itself implies that what you are intending to do will be a security issue.

Disabling the CSRF protection is the only way to get it to work. Do you know where the requests are coming from? In that case you could make a whitelist of accepted domains and not have the form post directly to your own server.

If the form posts to its own site, the CSRF field can just be there. Then, in the local controller, forward the request to your own server with some sort of secret authentication token. That way, you keep the local protection and use some secret communication that can't be forged.

Thyrosis left a reply on Laravel Suite For The Win, But You've Gotta Know Your LAMP Stack Right? • 2 months ago

Well, I don't think you need to. Granted, I don't have a lot of working experience in that part of the business, but I guess it depends on the type of job/work.

I mean, if you work for yourself or even in a small team of developers, sure you need to know at least the basic workings of a LAMP stack to troubleshoot your issues. But if you work for a company like you describe it, I'm pretty sure they have hired someone with the skillset to do that.

So you only have to worry about the coding part of the job. Need a new server? There's a guy for that. Need it running on the new PHP 7.2? Just ask your guy.

But, as said, my experience is limited to the company I work for at the moment. It just seems right :)

19th December, 2017

Thyrosis left a reply on Database Update • 2 months ago

It depends on the data you are feeding Laravel from the file.

If each row stands for a model in your application, for instance a product with stock numbers, you could

  • loop through all lines
  • for each line, get the model from the data, based on productID
  • then save that model and move on to the next line.

That way your using already there models and eloquent to retrieve/save/update data, which beats the raw mysql code imho.

14th December, 2017

Thyrosis left a reply on Can't Click On 'mentions' Menu Using Current Firefox • 3 months ago


I've got the same issue with Firefox on Windows 10.

8th December, 2017

Thyrosis left a reply on PHPStorm • 3 months ago

I've been using Sublime for about six years, haven't missed PHPStorm at all.

Since Jeffrey made the VScode course available I've switched to that, as it's a really nice IDE too.

To be fair, if you're here asking questions about why it's paid software and having to watch tutorials to see if it's worth it: it's probably not. Stick with Sublime, switch to Code. They're both free to use and will probably offer enough for you to work with.

3rd December, 2017

Thyrosis left a reply on Relationship Laravel • 3 months ago

In similar situations, most systems I've seen don't even allow the deletion of non-empty categories. They'll ask the user which action to take to allow the deletion, so offer the choice between also deleting the linked models (wether it be posts in a specific forum-channel, products in a category or characters in a rpg membergroup) or moving them to another 'parent'.

So in your case it depends on what you need. Are you programming it for your own usage? The program it the way you want it. Are other people going to be using your application? I'd suggest giving them a choice.

Thyrosis left a reply on Relationship Laravel • 3 months ago

It depends on the project you're working on.

One option would be to delete the products when a category is deleted, either using the foreign key cascade Aardalich mentioned us just going the 'Laravel' way:

foreach ($category->products as $product) {


Another option could be to move to products to a different category (maybe even an archive category). In case of things like a webshop, you should always keep the product available somewhere to check back on orders.

foreach ($category->products as $product) {
    $product->category = Category::getArchive();

Or lastly, if you don't have a problem with orphaned products, you can just set the category to 0 and be done with it. You can then get all products which are not related to a category and maybe mass update them.

2nd December, 2017

Thyrosis left a reply on How To Change From SSL Url To Non SSL Url • 3 months ago

Maybe there's a redirect to https:// in the .htaccess-file (in public folder)?

Thyrosis left a reply on Why Is Laravel Not Running In Wamp? • 3 months ago

Do you have the same symlink setup as in the live server?

I know in my own project I've got that issue. It's running live on Linux and I've set the symlink from public to storage, but on my Windows dev environment it doesn't have a symlink thus all images are unavailable.

Thyrosis left a reply on Why Form Is Not Submitting Input Fields To Server ? • 3 months ago

I think that might be due to the way your browser parses the form and sends it upon submission.

Have a look what happens if you remove the divs and have the input fields straight inside the elelement. You should be able to see the fields then.

Maybe this will help?

Thyrosis left a reply on How To Change From SSL Url To Non SSL Url • 3 months ago

The URL should be set in the env-file under APP_URL or in config/app.php under 'url'.

Thyrosis left a reply on Whats The Logic To Make EXP Point Like Laracast? • 3 months ago

Well, that shouldn't be too hard?

Instead of incrementing the experience in the [email protected], increment it in the function which sets the status of the post to published.

In that case, you'll use $thread->owner instead of auth()->user(), because obviously the authenticated user is the admin itself.

Thyrosis left a reply on Whats The Logic To Make EXP Point Like Laracast? • 3 months ago

I've actually just implemented this in my own forum, because it sounded cool to have.





return [

    'experience' => [
        'new_reply' => 5,
        'best_reply' => 25,
        'favourite_reply' => 1,
        'new_thread' => 10,
        'new_threadsubscription' => 5,
        'archive_thread' => 50,
        'new_character' => 10,

[email protected]

auth()->user()->increment('experience', config('custom.experience.new_thread'));

[email protected]

$thread->owner->decrement('experience', config('custom.experience.new_thread'));


<div class="panel-heading">{{ $profile->name }} <div class="pull-right">{{ $profile->experience }} exp</div></div>

And then just call the increment function on whichever action you want and have defined an experience score for.

1st December, 2017

Thyrosis left a reply on Whats The Logic To Make EXP Point Like Laracast? • 3 months ago

Add a column 'exp' to the users table.

Then for each reply, add x amount of points to that users exp. Same for best reply marked or any other action that you reward points for.

When a reply is deleted or any other action is reversed, remove the same amount of points you rewarded.

This way you always have a real time representation of the amount of exp used and you don't have to calculate it on the fly.

Thyrosis left a reply on CURL Requests Not Working When Pushed To Live Server • 3 months ago

Two things come to mind: There could be a restriction on their API based on an IP address, so that when you access the API from a different server it won't let you connect. Your Ravelry dashboard or admin page could help you out on that one.

The second thing is to dump result without json_decode wrapped around the curl_exec. Because now your dumping the result of the json decoded result which, if the result isn't json, won't give you much to go on.

30th November, 2017

Thyrosis left a reply on Accessing Authenticated User In ServiceProvider • 3 months ago

I got it!

Well, no, I didn't. But hey, at least I got it to work :)

Instead of going with a ServiceProvider, I'm now using Middleware. It's simple really if you think about it...

namespace App\Http\Middleware;

use Closure;
use Illuminate\Support\Facades\View;

class CheckTheme
     * Handle an incoming request.
     * @param  \Illuminate\Http\Request  $request
     * @param  \Closure  $next
     * @return mixed
    public function handle($request, Closure $next)
        $views = resource_path("views/themes/default");

        if (auth()->check()) {
            $views = resource_path("views/themes/{auth()->user()->theme}");

        View::addNamespace('theme', $views);
        return $next($request);

I've added it to the app/Http/Kernel.php file in the web MiddlewareGroup after the session middleware has been run, so the session (and thus getting an authenticated user with auth() ) is available in the CheckTheme middleware.

So there you have it. No ServiceProvider, but a solution nonetheless. If anyone has the answer to the original question, I'll still have it though - I just figured ServiceProviders aren't supposed to be used for these kind of situations.

28th November, 2017

Thyrosis left a reply on How To Use Laravel Scout Free • 3 months ago

Algolia does offer a free plan with up to 30 queries per second, 10K Records and 100K Operations. That seems okay for any free plan and also seems enough for most run-of-the-mill sites.

Personally I'm a big advocate for investing in your infrastructure and using and paying for what you need to successfully run your site. Now I have to say, to upgrade from a free plan to $35 is a pretty steep jump. Then again, if your website runs out of the available options on the free plan, you should be able to generate enough revenue to cover your costs.

ElasticSearch starts at $45 for the hosted solution so is even more expensive than Algolia. If you want to run it yourself, you'll need to install it on a server running Java, so like Martin already mentioned, you'll be spending some time in setting it up and incur some running costs.

You could also try, they offer a free plan (2 indices, whatever that means). Or Amazon Cloudsearch (, there you only pay for what you use. Same for Azure Search (

So yeah, apparently searching services are rather expensive. If they're too expensive and your project allows it, maybe your better off implementing your own search functionality.

Edit Your Profile

Want to change your profile photo? We pull from