Trending questions in Web Development

0 votes
1 answer

How to create a laravel hashed password?

Hii @kartik, Hashing A Password Using Bcrypt in Laravel: $password ...READ MORE

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

Using Artisan::call() to pass non-option arguments

Hello @kartik, Use: Artisan::call('db:migrate', ['' => 'mymigration', '--table' => ...READ MORE

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

How to trigger the window resize event in JavaScript?

Hello @kartik, Try this: window.dispatchEvent(new Event('resize') ...READ MORE

Aug 25, 2020 in Java-Script by Niroj
• 82,880 points
3,192 views
0 votes
1 answer

How to implement a writable stream?

Hello @kartik, to create a writeable stream is ...READ MORE

Oct 13, 2020 in Node-js by Niroj
• 82,880 points
1,054 views
0 votes
1 answer

What is reverse routing in Laravel?

 Laravel reverse routing is generating URL's based ...READ MORE

Mar 17, 2020 in Laravel by Niraj
10,113 views
0 votes
1 answer

How to split and modify a string in NodeJS?

Hello @kartik, Use split and map function: var str = "123, 124, 234,252"; var ...READ MORE

Oct 16, 2020 in Node-js by Niroj
• 82,880 points
906 views
0 votes
1 answer

How do I check if an HTML element is empty using jQuery?

Hello @kartik, Try: if ($('#element').is(':empty')){ //do something }  If you ...READ MORE

Aug 25, 2020 in Java-Script by Niroj
• 82,880 points
3,161 views
0 votes
1 answer

How to create Eloquent model with relationship?

Hello @kartik, First, you have to create relation ...READ MORE

Oct 28, 2020 in Laravel by Niroj
• 82,880 points
358 views
0 votes
1 answer

How to get the location from an IP address?

Hello @kartik, You could download a free GeoIP ...READ MORE

Sep 17, 2020 in PHP by Niroj
• 82,880 points
2,136 views
0 votes
1 answer

How to execute PHP code from the command line?

Hello @kartik, the php command offers two switches to ...READ MORE

Oct 1, 2020 in PHP by Niroj
• 82,880 points
1,523 views
0 votes
1 answer

Catchable fatal error: Argument 1 passed to ClassA::method_a() must be an instance of ClassB, instance of ClassWrong given..

Hello @kartik, This is not a catchable fatal ...READ MORE

Oct 22, 2020 in PHP by Niroj
• 82,880 points
602 views
0 votes
1 answer

How to convert an Object {} to an Array [] of key-value pairs in JavaScript?

Hello @kartik, You can use Object.keys() and map() to do this var obj ...READ MORE

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

How to execute a MySQL command from a shell script?

Hello @kartik, You need to use the -p flag to ...READ MORE

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

How to Change the selected value of a drop-down list with jQuery?

Hello @kartik, With hidden field you need to ...READ MORE

Sep 9, 2020 in Java-Script by Niroj
• 82,880 points
2,449 views
0 votes
1 answer

How to Install Laravel without using Composer?

Hello @kartik, If you really wanted to, you ...READ MORE

Aug 10, 2020 in Laravel by Niroj
• 82,880 points
3,758 views
0 votes
1 answer

How to reject in async/await syntax?

Hello @kartik,  throw an Error wrapping the value, which results in ...READ MORE

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

How to remove all child elements of a DOM node in JavaScript?

Hello @kartik, Use modern Javascript, with remove! const parent = ...READ MORE

Sep 21, 2020 in Java-Script by Niroj
• 82,880 points
1,917 views
0 votes
2 answers

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

Simply, $source = 'Source_file_location' ...READ MORE

Oct 12, 2020 in PHP by anonymous
• 140 points
1,202 views
0 votes
1 answer

How to use MongoDB with promises in Node.js?

Hello @kartik, Try this: var MongoClient = require('mongodb').MongoClient var url ...READ MORE

Oct 12, 2020 in Node-js by Niroj
• 82,880 points
1,027 views
0 votes
1 answer

How to get the available tasks list in gulp?

Hello @kartik,  I got it use the gulp --tasks in ...READ MORE

Oct 13, 2020 in Node-js by Niroj
• 82,880 points
931 views
0 votes
1 answer

How do I add PHP code/file to HTML(.html) files?

Hello @kartik, You can't run PHP in .html ...READ MORE

Oct 22, 2020 in PHP by Niroj
• 82,880 points
541 views
0 votes
1 answer

Invalid argument supplied for foreach() on line 25. Error in my php and mysql

Hello @viven , This should be a simple fix ...READ MORE

Aug 4, 2020 in PHP by Niroj
• 82,880 points
3,936 views
0 votes
1 answer

How to run specific migration in laravel?

Hello @kartik, Use this command: php artisan migrate --path=/database/migrations/my_migration.php  And ...READ MORE

Aug 10, 2020 in Laravel by Niroj
• 82,880 points
3,690 views
0 votes
1 answer

How can I pass PHP objects to javascript?

Hello @kartik, You can convert the PHP object ...READ MORE

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

How to Determine if page is valid in JavaScript - ASP.NET?

Hello @kartik,  Make the call on an input ...READ MORE

Sep 9, 2020 in Java-Script by Niroj
• 82,880 points
2,368 views
0 votes
1 answer

How to reload or re-render the entire page using AngularJS?

Hello @kartik< For the record, to force angular ...READ MORE

Jul 15, 2020 in Node-js by Niroj
• 82,880 points
4,736 views
0 votes
1 answer

Error: cannot call methods on dialog prior to initialization; attempted to call method 'close'

Hello @kartik, Looks like your buttons are not ...READ MORE

Apr 28, 2020 in JQuery by Niroj
• 82,880 points
8,099 views
0 votes
1 answer

How to get the host url using javascript from the current page?

Hello @kartik, Use: var host = window.location.hostname; or possibly var host ...READ MORE

Oct 9, 2020 in Java-Script by Niroj
• 82,880 points
1,005 views
0 votes
1 answer

How to creat and Update Laravel Eloquent?

Hello @kartik, Here's a full example of what ...READ MORE

Oct 19, 2020 in PHP by Niroj
• 82,880 points
598 views
0 votes
1 answer

How to check if the URL contains a given string?

Hello @kartik, You would use indexOf like this: if(window.location.href.indexOf("franky") != -1){....} Also ...READ MORE

Jun 11, 2020 in Java-Script by Niroj
• 82,880 points
6,145 views
0 votes
1 answer

How can I pretty-print JSON using node.js?

Hello @kartik, JSON.stringify's third parameter defines white-space insertion ...READ MORE

Jul 12, 2020 in Node-js by Niroj
• 82,880 points
4,796 views
0 votes
1 answer

How to get all pending jobs in laravel queue on redis?

Hello @kartik, Here is the way I do ...READ MORE

Apr 6, 2020 in Laravel by Niroj
• 82,880 points
8,985 views
0 votes
1 answer

How do you create optional arguments in php?

Hello @kartik, Use an equals (=) sign in ...READ MORE

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

Error:Swift_TransportException Expected response code 220 but got code "", with message ""

Hello @kartik, This problem can generally occur when ...READ MORE

Jul 30, 2020 in Laravel by Niroj
• 82,880 points
3,960 views
0 votes
1 answer

How to get current PHP page name?

Hello @kartik, You can use basename() and $_SERVER['PHP_SELF'] to get current page ...READ MORE

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

How to uncheck a radio button?

Hello @kartik, either (plain js) this.checked = false; or (jQuery) $(this).prop('checked', ...READ MORE

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

How can I remove or replace SVG content?

Hello @kartik, Setting the id attribute when appending ...READ MORE

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

How can I check if a checkbox is checked?

Hello @kartik, Try this: function validate() { var ...READ MORE

Oct 8, 2020 in Java-Script by Niroj
• 82,880 points
928 views
0 votes
1 answer

How to get “should.be.false” syntax pass jslint?

Hello @kartik, You can add /*jshint expr: true*/ to the ...READ MORE

Oct 16, 2020 in Node-js by Niroj
• 82,880 points
569 views
0 votes
1 answer

How to return JSON with ASP.NET & jQuery?

Hello @kartik, You need to do something like ...READ MORE

Sep 9, 2020 in Java-Script by Niroj
• 82,880 points
2,165 views
0 votes
1 answer

Error:Composer Out of memory in Laravel?

Hey @kartik, This Error  happens in almost all ...READ MORE

Mar 30, 2020 in Laravel by Niroj
• 82,880 points
9,207 views
0 votes
1 answer

How to access class constants in Twig?

Hello @kartik, Try this: {% if var == constant('Namespace\\Entity::TYPE_PERSON') ...READ MORE

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

How do I parse JSON with Ruby on Rails?

Hello @kartik, Use  hash = JSON.parse string Rails should automagically ...READ MORE

Jul 25, 2020 in Java-Script by Niroj
• 82,880 points
4,160 views
0 votes
1 answer

How to allow access outside localhost?

Hello kartik, You can use the following command ...READ MORE

Apr 22, 2020 in Angular by Niroj
• 82,880 points
8,177 views
0 votes
1 answer

How to Convert timestamp to readable date/time PHP?

Hello @kartik, Use PHP's date() function. Example: echo date('m/d/Y', 1299446702); Hope it helps!! Thank ...READ MORE

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

How to getting the location from an IP address?

Hello @kartik, You could download a free GeoIP ...READ MORE

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

Error:Nodejs cannot find installed module on Windows

Hello @kartik, Add an environment variable called NODE_PATH and set ...READ MORE

Jul 15, 2020 in Node-js by Niroj
• 82,880 points
4,516 views
0 votes
1 answer

How to create an Excel File with Nodejs?

Hello @kartik, Just create a file with Tabs ...READ MORE

Sep 7, 2020 in Node-js by Niroj
• 82,880 points
2,173 views
0 votes
1 answer

Error:No Application Encryption Key Has Been Specified

Hello @kartik, Open command prompt in the root ...READ MORE

Jul 22, 2020 in PHP by Niroj
• 82,880 points
4,226 views
0 votes
1 answer

How to clear all <div>s’ contents inside a parent <div>?

Hello @kartik, jQuery's empty() function does just that: $('#masterdiv').empty(); clears the master div. $('#masterdiv ...READ MORE

Oct 7, 2020 in Java-Script by Niroj
• 82,880 points
860 views