Trending questions in Web Development

0 votes
1 answer

How to only use created_at in Laravel?

Hello @kartik, Eloquent does not provide such functionality ...READ MORE

Aug 11, 2020 in Laravel by Niroj
• 82,880 points
2,728 views
0 votes
1 answer

Error: Cannot resolve module 'style-loader'

Hello @kartik, Try  to run script below: npm install ...READ MORE

May 18, 2020 in Java-Script by Niroj
• 82,880 points
6,391 views
0 votes
1 answer

Fatal error: Class 'SoapClient' not found in C:\Program Files (x86)\EasyPHP-5.3.9\www\server.php on line 2

Hello @kartik, To install SOAP in PHP-7 run ...READ MORE

Aug 14, 2020 in PHP by Niroj
• 82,880 points
2,619 views
0 votes
1 answer

How do I uninstall a package installed using npm link?

Hello @kartik, The package can be uninstalled using ...READ MORE

Jul 16, 2020 in Node-js by Niroj
• 82,880 points
3,838 views
0 votes
1 answer

Error:ReflectionException: Class ClassName does not exist - Laravel

Hello @kartik, Perform a composer update, then composer dump-autoload. If the ...READ MORE

Aug 11, 2020 in Laravel by Niroj
• 82,880 points
2,717 views
0 votes
1 answer

How can we allow the funtion to have access to $slug?

Hello @kartik, You have to use use to pass variables ...READ MORE

Sep 30, 2020 in Laravel by Niroj
• 82,880 points
528 views
0 votes
1 answer

How to execute an external program from within Node.js?

Hello @kartik, Exec has memory limitation of buffer ...READ MORE

Jul 17, 2020 in Node-js by Niroj
• 82,880 points
3,757 views
0 votes
1 answer

How to copy a file from one directory to another using PHP?

Hello @kartik, You could use the copy() function : // Will ...READ MORE

Sep 15, 2020 in PHP by Niroj
• 82,880 points
1,135 views
0 votes
1 answer

How to convert a string to date in mysql?

Hello @kartik, you can do SELECT STR_TO_DATE(yourdatefield, '%m/%d/%Y') FROM ...READ MORE

Aug 20, 2020 in PHP by Niroj
• 82,880 points
2,258 views
0 votes
1 answer

How do I get a YouTube video thumbnail from the YouTube API?

Hello @kartik, Each YouTube video has four generated ...READ MORE

Jun 16, 2020 in PHP by Niroj
• 82,880 points
5,059 views
0 votes
1 answer

How can I specify a local gem in my Gemfile?

Hello @kartik, In order to use local gem ...READ MORE

Jul 24, 2020 in Java-Script by Niroj
• 82,880 points
3,375 views
0 votes
1 answer

How to delete all files from a folder using PHP?

Hello @kartik, Use this: $files = glob('path/to/temp/*'); // get ...READ MORE

Sep 14, 2020 in PHP by Niroj
• 82,880 points
1,161 views
0 votes
1 answer

How to export the MySql database structure without the data just the structure?

Hello @kartik, You can do with the --no-data option with ...READ MORE

Aug 18, 2020 in PHP by Niroj
• 82,880 points
2,291 views
0 votes
1 answer

How to pass an array as a function parameter in JavaScript?

Hello @kartik, Use: const args = ['p0', 'p1', 'p2']; call_me.apply(this, ...READ MORE

Sep 4, 2020 in Java-Script by Niroj
• 82,880 points
1,547 views
0 votes
1 answer

How can I build a condition based query in Laravel?

Hello @kartik, Try this: $query = DB::table('node'); if ($published == ...READ MORE

Sep 28, 2020 in Laravel by Niroj
• 82,880 points
512 views
0 votes
0 answers

How to have SQL injection when using php function?

I'm having sql query as $login = mysql_real_escape_string(GetFromPost('login')); $password ...READ MORE

Sep 23, 2020 in PHP by Rohan
• 120 points
737 views
0 votes
1 answer

How to use $(document).ready equivalent without jQuery

Hello @kartik, Using DOMContentLoaded that is supported by over ...READ MORE

Sep 10, 2020 in JQuery by Niroj
• 82,880 points
1,255 views
0 votes
1 answer

How to redirect 404 errors to a page in ExpressJS?

Hello @kartik, You can put a middleware at ...READ MORE

Jul 16, 2020 in Node-js by Niroj
• 82,880 points
3,678 views
0 votes
1 answer

How to list npm user-installed packages?

Hello @kartik, This works pretty well too:  npm list ...READ MORE

Jul 9, 2020 in Node-js by Niroj
• 82,880 points
3,964 views
0 votes
1 answer

How to perform a delete operation on a Model?

Hello @kartik, You can put this code for ...READ MORE

Sep 30, 2020 in Laravel by Niroj
• 82,880 points
367 views
0 votes
1 answer

How to get all columns' names for all the tables in MySQL?

Hello @kartik, Try this: select * from information_schema.columns where table_schema ...READ MORE

Aug 19, 2020 in PHP by Niroj
• 82,880 points
2,171 views
0 votes
1 answer

How can I capture the result of var_dump to a string?

Hello @kartik, Try var_export You may want to check out var_export — ...READ MORE

Sep 16, 2020 in PHP by Niroj
• 82,880 points
958 views
0 votes
1 answer

How to disable registration new users in Laravel?

Hello @kartik, Laravel 5.7 introduced the following functionality: Auth::routes(['register' ...READ MORE

Aug 24, 2020 in PHP by Niroj
• 82,880 points
1,971 views
0 votes
1 answer

I've a query for <form>tag

That might be because button inside form ...READ MORE

Nov 2, 2020 in HTML by sindhu
582 views
0 votes
1 answer

Error:“The page has expired due to inactivity” - Laravel 5.5

Hello @kartik, Make sure you have already added ...READ MORE

Aug 4, 2020 in Laravel by Niroj
• 82,880 points
2,804 views
0 votes
1 answer

How do I measure the execution time of JavaScript code with callbacks?

Hello @kartik, Use the Node.js console.time() and console.timeEnd(): var i; console.time("dbsave"); for(i = 1; ...READ MORE

Sep 23, 2020 in Java-Script by Niroj
• 82,880 points
643 views
0 votes
1 answer

How to create HTML elements using jQuery?

Hello @kartik,  if you're doing $('<div>'), jQuery will also ...READ MORE

Sep 18, 2020 in Java-Script by Niroj
• 82,880 points
824 views
0 votes
1 answer

How to select and manipulate CSS pseudo-elements such as ::before and ::after using jQuery?

Hii @kartik, Here is the way to access ...READ MORE

May 18, 2020 in Java-Script by Niroj
• 82,880 points
6,133 views
0 votes
1 answer

How to decode the url in php where url is encoded with encodeURIComponent()?

Hello @kartik, Use this function: <?php $string = 'http%3A%2F%2Fexample.com'; $output = ...READ MORE

Jul 7, 2020 in Java-Script by Niroj
• 82,880 points
3,961 views
0 votes
1 answer

How to pass props to {this.props.children}?

Hello @kartik,  Try using this: <div> ...READ MORE

Jul 22, 2020 in Angular by Niroj
• 82,880 points
3,311 views
0 votes
1 answer

How to output MySQL query results in CSV format?

Hello @kartik, Using this command columns names will ...READ MORE

Aug 18, 2020 in PHP by Niroj
• 82,880 points
2,164 views
0 votes
1 answer

How to populating a database in a Laravel migration file?

Hello @kartik, Don't put the DB::insert() inside of ...READ MORE

Aug 4, 2020 in Laravel by Niroj
• 82,880 points
2,749 views
0 votes
1 answer

I want to store some photos for a product using sql?

Hello, if you are going to store the ...READ MORE

Sep 28, 2020 in PHP by Niroj
• 82,880 points
339 views
0 votes
1 answer

Parse Error: Adjacent JSX elements must be wrapped in an enclosing tag

Hello @kartik, You  just need to put your ...READ MORE

Jun 8, 2020 in Java-Script by Niroj
• 82,880 points
5,182 views
0 votes
1 answer

Error:jQuery.parseJSON throws “Invalid JSON” error due to escaped single quote in JSON

Hello @kartik, Striking a similar issue using CakePHP ...READ MORE

Jun 19, 2020 in Java-Script by Niroj
• 82,880 points
4,670 views
0 votes
1 answer

How to render raw html with AngularJS?

Hello @kartik, You need to add ng-bind-html="data.text" to your h1 ...READ MORE

Jun 20, 2020 in Java-Script by Niroj
• 82,880 points
4,645 views
0 votes
1 answer

How do I get a file extension in PHP?

Hello @kartik, pathinfo() $path_info = pathinfo('/foo/bar/baz.bill'); echo $path_info['extension']; // "bill" Hope ...READ MORE

Sep 16, 2020 in PHP by Niroj
• 82,880 points
804 views
0 votes
1 answer

Getting error while validating email address in JavaScript

Hello @Eureka , You are missing jquery library. Add ...READ MORE

Sep 9, 2020 in Java-Script by Niroj
• 82,880 points
1,110 views
0 votes
0 answers

How to create a <style> tag with Javascript?

I'm looking for a way to insert ...READ MORE

Sep 21, 2020 in Java-Script by kartik
• 37,510 points
615 views
0 votes
1 answer

How to check if a specific key is present in a hash or not?

Hello @kartik, While Hash#has_key? gets the job done, as it has ...READ MORE

Jul 24, 2020 in Java-Script by Niroj
• 82,880 points
3,059 views
+1 vote
2 answers

How to set cache false for getJSON in jQuery?

You can't pass any configuration parameters to ...READ MORE

Oct 7, 2020 in JQuery by Amit
• 140 points
2,552 views
0 votes
1 answer

How do I determine the current operating system with Node.js

Hello @kartik, With Node.js v6 (and above) there ...READ MORE

Jul 14, 2020 in Node-js by Niroj
• 82,880 points
3,475 views
0 votes
1 answer

Error: Cannot read property 'setState' of undefined

Hello @kartik, This is due to this.delta not being bound ...READ MORE

Jul 22, 2020 in Angular by Niroj
• 82,880 points
3,107 views
0 votes
1 answer

Error:MySQL Update Inner Join tables query

Hello @kartik, Try this: UPDATE business AS b INNER JOIN ...READ MORE

Aug 19, 2020 in PHP by Niroj
• 82,880 points
1,903 views
0 votes
0 answers

Guys i need help. I converted my php pure code to laravel but it seems a problem

This is pure code : public function getComments() ...READ MORE

Sep 17, 2020 in Web Development by Hawati
• 120 points

edited Sep 18, 2020 by Gitika 649 views
0 votes
1 answer

Error: Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function but got: object

Hello @kartik, You need export default or require(path).default var ...READ MORE

Jul 22, 2020 in Angular by Niroj
• 82,880 points
3,066 views
0 votes
1 answer

How do I declare a namespace in JavaScript?

Hello @kartik, Try this: var yourNamespace = { ...READ MORE

Sep 21, 2020 in Java-Script by Niroj
• 82,880 points
426 views
0 votes
1 answer

How to send HTTP response code?

Hello @kartik, you can use http_response_code() for get and set ...READ MORE

Sep 14, 2020 in PHP by Niroj
• 82,880 points
707 views
0 votes
1 answer

How to secure database passwords in PHP

Hello @kartik, If you're hosting on someone else's ...READ MORE

Sep 16, 2020 in PHP by Niroj
• 82,880 points
585 views
0 votes
1 answer

How to programmatically send a 404 response with Express/Node?

Hello @kartik, The method is: res.sendStatus(404); Express will send a ...READ MORE

Jul 16, 2020 in Node-js by Niroj
• 82,880 points
3,258 views