Quantcast
Channel: User totymedli - Stack Overflow
Browsing all 44 articles
Browse latest View live

Comment by totymedli on Laravel check for unique rule without itself in update

If you defined your route like this: Route::apiresource('car', 'Api\CarController') then you can retrieve the resource's id like this: request()->route('car') or...

View Article



Comment by totymedli on How can I get id from url with Request $request?...

@rosscooper Exactly. If you defined the route like this: Route::apiresource('car', 'Api\CarController'), you have to use $request->route('car') or $request->route()->parameters['car']. You can...

View Article

Comment by totymedli on How to use two Y axes in Chart.js v2?

BTW axes have default ids if you don't provide them. You can reference the axes by these in the datasets in that case: x-axis-0, y-axis-0, y-axis-1.

View Article

Comment by totymedli on AJV - Check property is a function

TL;DR from DavidP's answer: use instanceof: 'Function'

View Article

Comment by totymedli on How can I redirect in React Router v6?

If you want to redirect outside react components or without hooks, check out this answer.

View Article


Comment by totymedli on Jest gives `Cannot find module` when importing...

"modulePaths": ["<rootDir>/src/"] was what I needed.

View Article

Comment by totymedli on How do I allow HTTPS for Apache on localhost?

@DimitrisPapageorgiou You open the link printed by the script. You can use it by yourself or send it to anybody over the internet and it will be an HTTPS connection to your local env.

View Article

Comment by totymedli on Table Naming: Underscore vs Camelcase? namespaces?...

One thing to consider is what casing your frontend uses. With some technologies your JSON API properties will have the same casing as your ORM & DB which will cause mixed casing in your frontend...

View Article


Comment by totymedli on How does Content-Aware fill work?

It would be nice to summarize the paper. The content already went down and only available via the Wayback Machine.

View Article


Comment by totymedli on Docker not running Ubuntu 20.04

Option 1 is the desired solution. If that single line doesn't fix it, check the other steps in the Docker guide on setting up non-root access.

View Article

Comment by totymedli on Error loading webview: Error: Could not register...

I just restarted VSCodium and it fixed it on Kubuntu.

View Article

Comment by totymedli on PHP Fatal error: Cannot use positional argument after...

For this to work, you need to name your argument the same as the parameter of the function that will take it. If there is no parameter named that way, this won't work. So in most cases, you have to be...

View Article

Comment by totymedli on ESLint broken: Rules with suggestions must set the...

Upgrading the npm package that provided the rule fixed the problem.

View Article


Comment by totymedli on How to keep undo history after closing vscode?

@MarkRansom Except when you have a pre-commit hook that modifies your code so it isn't your version that gets committed thus losing your work.

View Article

Answer by totymedli for Class App\Http\Controllers\ResetPasswordController...

I got this error because the class's namespace declaration didn't match the path of the file. It was:namespace App\Http\Controllers\Api\Auth;While the file path...

View Article


Answer by totymedli for Laravel 5: Request validate multidimensional array

Laravel 5.5 or newerYou can use the same array validation syntax that is available in the Validator, so the code in the question now works:public function rules(){ return ['id' => 'required','slide'...

View Article

Answer by totymedli for JS remove everything after the last occurrence of a...

Generic solutionThis is a generic function that also handles the edge case when the searched character or string (needle) is not found in the string we are searching in (haystack). It returns the...

View Article


Answer by totymedli for Chaining functions in Cypress

You should read the page called Introduction to Cypress from the Official documentation, or more generally everything under the "Core Concepts" menu. Most of these topics and concepts are explained...

View Article

Answer by totymedli for How to middle align cell value in PhpSpreadsheet?

Beyond the style array way you can also do it in the method chaining...

View Article

Image may be NSFW.
Clik here to view.

Answer by totymedli for Styling cell borders with PhpSpreadsheet PHP

tl;drBeyond the style array way you can also do it in the method chaining way:use PhpOffice\PhpSpreadsheet\Style\Border;use PhpOffice\PhpSpreadsheet\Style\Color;$spreadsheet ->getActiveSheet()...

View Article
Browsing all 44 articles
Browse latest View live




Latest Images