Cruorzy

Experience

16,810

11 Best Reply Awards

  • Member Since 2 Months Ago
  • 89 Lessons Completed
  • 21 Favorites

10th September, 2018

Cruorzy left a reply on How To Disable User Registration In Laravel 5.7 • 1 week ago

If you ever ran the php artisan make:auth command then I would personally do the same thing in a new repo with git setup, see exactly which files are modfied and created and roll that back in the project where you want to disable it.

If you never ran the command then it is not enabled.

Cruorzy left a reply on 1234 • 1 week ago

Hoedje van papier.

5th September, 2018

Cruorzy left a reply on How Do I Normalize This Case Into Database? • 2 weeks ago

Save it as a json object?

And maybe only the "TRUE" on the months so you save space by not saving the FALSE

Cruorzy left a reply on Other Way On Logging Out Specific User? • 2 weeks ago

Why keep maming new posts if you had solutions for it that will work for sure @Cronix gave some really good solutions in your case. That you don't get them to work then comment without any information where you got stuck is all on you.

if (!Auth::user()->isActive()) {
    Auth::logout();
}

or

if (Auth::id() == 1) {
    Auth::logout();
return redirect('/somewhere/else');
}

Will work just fine, YES it will logout the current user IF the isActive field is set to TRUE! Then reset it to false piece of cake....

AND lets make this clear.

"Is there other way on logging out a specific user? This been an issue for this for a year now and there's no appropriate response to this problem."

We are not your payed servicedesk, when you think there is no answer then there is none. we are not required to give you a solution at ALL.

4th September, 2018

Cruorzy left a reply on Sample • 2 weeks ago

a small amount of something that shows you what the rest is or should be like.

This ain't the dictionary.

Cruorzy left a reply on Getting ERROR 500 In Ajax Call (Laravel Project) • 2 weeks ago

A decent browser has network tools from there you can select the 500 return and actually see the error message

Cruorzy left a reply on How To Add External Css File Into Laravel-mix S • 2 weeks ago

in resources/css/app.scss

@import "yourfile";

Cruorzy left a reply on Showing Latest Project • 2 weeks ago

@newbie360 I found that somewhere not tried it yet, does this also trigger on create/delete or only update?

3rd September, 2018

Cruorzy left a reply on Showing Latest Project • 2 weeks ago

@alanholmes Could be wrong but I think he is aware of that, what I get out from the question is that he saves several relation ships like Task/Credential/Wiki

And he wants to show he latest project with the latest change to one of those relationships.

The updated_at of the parent project does NOT update when a relation is saved, i'm guessing he wants something like this.

The problem when updating a relation and setting the updated_at of the parent to NOW() would be that any changes to the project itself also updates the updated_at.

In some cases this is not wanted at all so a seperate column could be created for it.

It really depends on the project but you could simply listen for a update/create/remove and $parent->touch() when that is called

Cruorzy left a reply on Showing Latest Project • 2 weeks ago

I get the question and currently thinking about a solution myself since I have a similair issue, Personally I think updating the updated_at on the task when the relation is saved. This can be done with a trait the exact way I still have to research.

Anyway my contribution would be for others browsing through the posts and seeing "important" instead of a title that matches the question. Basic form rules you know.

Cruorzy left a reply on Showing Latest Project • 2 weeks ago

I'd call it improvement.

Cruorzy left a reply on Important • 2 weeks ago

Incorrect title, don't really find this important

30th August, 2018

Cruorzy left a reply on Emptying A Dir From Controller? • 3 weeks ago

Cruorzy left a reply on HOW CAN I REDUCE EXECUTION TIME OF THESE SCRIPT • 3 weeks ago

HOW CAN I INCREASE THE INFORMATION ABOUT WHAT HE IS TALKING ABOUT ON THIS POST.

Cruorzy left a reply on How To Do Fast Pagination • 3 weeks ago

Yes it only gets 20 users instead of all, behind the scenes its just a sql query with an offset.

Cruorzy left a reply on Insert Multiple Rows Data Into Database • 3 weeks ago

Might be helpful if you give us some code on the ways that did not work for you.

24th August, 2018

Cruorzy left a reply on Show Relation Field On Resource Index • 4 weeks ago

No idea what you mean with not only in the details view but also directly on the index. if you talking about showing it on the indes.blade.php then you surely can.

23rd August, 2018

Cruorzy left a reply on Override Laravel Forgot Password Redirect • 1 month ago

@martinbean I think his issue is if he is logged in and tries to go to that page is redirects since it only accepts guest users, so the middleware is the issue

The middleware can be found in App\Http\Middleware\RedirectIfAuthenticated.php

return redirect('/');

Cruorzy left a reply on Problem With Sending Mail, Credentials Are Not Read From .env-file • 1 month ago

Great make sure you dind't commi the info with git, else it will be saved forever.

Cruorzy left a reply on Override Laravel Forgot Password Redirect • 1 month ago

Original code can be found in

vendor/laravel/framework/src/Illuminate/Foundation/Auth/SendsPasswordResetEmails.php

But I only see redirect backs, so not sure why you would get redirected to /home

Cruorzy left a reply on Problem With Sending Mail, Credentials Are Not Read From .env-file • 1 month ago

@Kartsa Idk how you structured it now but putting personal info email/password in a config file and then commit is a general bad idea.

Cruorzy left a reply on Override Laravel Forgot Password Redirect • 1 month ago

Do you mean when you asked for the password reset link or when you changed your password?

Cruorzy left a reply on The Requested URL .. Was Not Found On This Server. • 1 month ago

@florent6001 Make sure your document root is directed to the public folder.

22nd August, 2018

Cruorzy left a reply on Image Upload With Original Name In Laravel 5.6 • 1 month ago

@jlrdw We noobies need that exp tho.

Cruorzy left a reply on Problem With Sending Mail, Credentials Are Not Read From .env-file • 1 month ago

The issue with the .env file is that it won't clear and set the right values for everyone easly.

IF env('mail') or config('mail') does return null try one of the commands below and after each command check the value of the env again with code.

php artisan config:cache
php artisan config:clear
php artisan cache:clear

Cruorzy left a reply on No Query Results For Model [App\Product] UpdateAll In Vue • 1 month ago

@MikeMacDowell That's some serious digging, I remember having the same problem when I started and never figured out what it was. Must be this.

I would have missed this anytime.

Cruorzy left a reply on Array Index • 1 month ago

It basically does the same, but whatever.

Cruorzy left a reply on Array Index • 1 month ago

Never ran this code but.. https://stackoverflow.com/a/40573241

Cruorzy left a reply on Problem With Sending Mail, Credentials Are Not Read From .env-file • 1 month ago

Maybe some lose bullet here, but don't you have to go to your gmail account and authorize something like 3rd party tools to send emails

Cruorzy left a reply on Difference Results Between Eloquent And DB Builder Queries ! • 1 month ago

I think people don't really want to click some link and see whatever is inside. Best thing to do is posting the code with the code

Cruorzy left a reply on Cannot Make Php Artisan Migrate Work • 1 month ago

Could be anything always test your connections before you setup the rest, will help alot of useless debugging.

After setting up the sql server make sure its the connection type you want (socket/tcp) etc and try to connect. Create the database then go further

Cruorzy left a reply on Blog Website • 1 month ago

@NOMGUY Seems like a bit of exp farming you are doing here.

Cruorzy left a reply on Blog Website • 1 month ago

@NOMGUY I find it strange when you gave so many good answers in a short time you asking these questions since with a bit of knowledge you could get real far.

Anyways https://laracasts.com/series/lets-build-a-forum-with-laravel covers some of these things.

Cruorzy left a reply on How To Solve Trying To Get Property 'name' Of Non-object • 1 month ago

@Snapey his answer worked for me, make sure to give him the best answer.

Cruorzy left a reply on Get Selected Value From Select On Change In Laravel • 1 month ago

Im sure Chrome tools -> network tools will help.

Cruorzy left a reply on Model • 1 month ago

return $this->hasOne('App\Phone', 'foreign_key', 'local_key');

Just a regular relationship where you specify the foreign and local key

21st August, 2018

Cruorzy left a reply on Why Boolean Parameters With The 'false' Value, Not Received In Request? • 1 month ago

<input type="hidden" name="something" value="0" />
<input type="checkbox" name="something" value="1" />

when checked it overrides the hidden value.

Cruorzy left a reply on Validation Errors Are Not Showing. • 1 month ago

This would have been valuable information from the start...

Well now you are talking about validation and application errors. so no idea.

Probably one of the better ways to customize http errors is simply create a view with the error. resources/views/errors/404.blade.php

And keeping the whoops errors for development is way better than a simple blank page with page not found.

20th August, 2018

Cruorzy left a reply on Laravel And Security With .git • 1 month ago

Since your webroot is in the public folder, the user doesn't have access to the folder above that. so something like /git or domain.com/resources won't work.

Cruorzy left a reply on Validation Errors Are Not Showing. • 1 month ago

From the little snippet you send where the markup is kinda mweh. I can't spot anything, however never had to use custom validation rules or regex so just start with the basic required rules submit and see what the result is.

Maybe show us the call to the validation?

Cruorzy left a reply on Validation Errors Are Not Showing. • 1 month ago

No code can't help.

Cruorzy left a reply on Dump And Die Can See Variable But I Am Unable To Print It Out • 1 month ago

Seems a bit weird, how about a return in the controller?

return $update->author->id

Cruorzy left a reply on Laravel Shared Hosting 404 Error • 1 month ago

The webroot should be in the public folder, the second error seems like your DB credentials aren't right or he can't connect.

Also the laravel.log give most of the time some useful errors, or temp enable debug.

Cruorzy left a reply on Composer Command Suddenly Not Found • 1 month ago

Depends on OS, you probably need to put it in your windows PATH again. http://webdevzoom.com/how-to-install-composer-on-windows/ step 6ish.

Cruorzy left a reply on Validation Errors Are Not Showing. • 1 month ago

We need more info and code, perhaps a full screenshot of the error

Cruorzy left a reply on How To Create Validation With Ajax? • 1 month ago

axios.post(this.endpoint, this.costs).then(response => { 
        this.data = response.data;
}).catch(error => {
    if (error.response.status === 422) {
        this.errors = error.response.data.errors;
    }
});

Cruorzy left a reply on How To Create Validation With Ajax? • 1 month ago

It will return a http 422 with the errors in the message.

make a data object called errors or something. then simply set the errors to the response data when laravle returns a 422

Edit Your Profile
Update

Want to change your profile photo? We pull from gravatar.com.