Trending questions in Web Development

+1 vote
1 answer

How to get public directory in laravel?

Hello @kartik, Use public_path() For reference: // Path to the project's ...READ MORE

Aug 10, 2020 in Laravel by Niroj
• 82,840 points
27,591 views
0 votes
2 answers

How can I set a session var using javascript and get it via php code?

Yes it is possible. You can either ...READ MORE

Aug 9, 2020 in Java-Script by Okugbe
• 280 points
28,785 views
0 votes
1 answer

Open a URL in a new tab (and not a new window)

Nothing an author can do can choose ...READ MORE

Feb 23, 2022 in Java-Script by Aditya
• 7,680 points
3,100 views
0 votes
1 answer

What do you meant by dd() function in Laravel?

Hey @kartik dd stands for "Dump and Die." Laravel's ...READ MORE

Mar 20, 2020 in Laravel by Niroj
• 82,840 points
33,463 views
0 votes
1 answer

npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\Niroj\package.json'

Hello @kartik, If you already have package-lock.json file just delete ...READ MORE

Oct 13, 2020 in Node-js by Niroj
• 82,840 points
24,393 views
+1 vote
1 answer

How to check if a record already exists in a laravel?

Hey, As a newbie it is most common ...READ MORE

Mar 31, 2020 in Laravel by Niroj
• 82,840 points
32,715 views
0 votes
1 answer

How to call function of one php file from another php file and pass parameters to it?

Hello @kartik, Include the first file into the ...READ MORE

Aug 27, 2020 in PHP by Niroj
• 82,840 points
26,170 views
0 votes
1 answer

How to pass multiple variables to another page in url?

Hello @kartik, Use the ampersand & to glue variables together: $url ...READ MORE

Nov 23, 2020 in PHP by Niroj
• 82,840 points
22,169 views
0 votes
1 answer

How to fill an input field using Puppeteer?

Hello @kartik, Just set value of input like ...READ MORE

Oct 16, 2020 in Node-js by Niroj
• 82,840 points
23,794 views
0 votes
1 answer
0 votes
1 answer

Convert a PHP object to an associative array

Start with simply typecasting the line:- $array = ...READ MORE

Feb 23, 2022 in PHP by Aditya
• 7,680 points
2,085 views
0 votes
1 answer

Difference between $(window).load() and $(document).ready() functions

To answer your question, the document.ready is ...READ MORE

Feb 23, 2022 in JQuery by Aditya
• 7,680 points
1,676 views
0 votes
1 answer

CodeIgniter removing index.php from url

To solve your doubt, use the following ...READ MORE

Feb 23, 2022 in PHP by Aditya
• 7,680 points
1,235 views
0 votes
1 answer

How do I strip all spaces out of a string in PHP?

If I have understood your question right, ...READ MORE

Feb 23, 2022 in PHP by Aditya
• 7,680 points
1,200 views
0 votes
1 answer

How to restart a node.js server?

Hello @kartik, If it's just running (not a ...READ MORE

Oct 12, 2020 in Node-js by Niroj
• 82,840 points
22,744 views
0 votes
1 answer

jQuery Event : Detect changes to the html/text of a div

Hello, If you don't want use timer and ...READ MORE

Nov 25, 2020 in JQuery by Niroj
• 82,840 points
20,550 views
0 votes
1 answer

What is "XX" in CXX in a cmake CMakeLists.txt file ?

Due to the macro identifiers limitations which ...READ MORE

Feb 8, 2022 in Web Development by Rahul
• 9,680 points
1,278 views
0 votes
1 answer

How do I convert a string to a number in PHP?

You don't have to do this, since ...READ MORE

Feb 23, 2022 in PHP by Aditya
• 7,680 points
594 views
0 votes
1 answer

How to get Root Directory Path of a PHP project?

Hello @kartik, Try $_SERVER['DOCUMENT_ROOT'] contains this path: D:/workspace In that case you ...READ MORE

Sep 1, 2020 in PHP by Niroj
• 82,840 points
23,851 views
0 votes
1 answer

How to run JavaScript code before page load?

Hello @kartik, You can use window.onpaint for such ...READ MORE

Sep 9, 2020 in Java-Script by Niroj
• 82,840 points
23,431 views
0 votes
1 answer

How do write IF ELSE statement in a MySQL query

You probably want to use a CASE ...READ MORE

Feb 18, 2022 in Web Development by Aditya
• 7,680 points
671 views
0 votes
1 answer

How do I give text or an image a transparent background using CSS?

In order to ensure that your image ...READ MORE

Feb 8, 2022 in HTML by Rahul
• 9,680 points
1,229 views
+1 vote
1 answer

Error:Class '\App\User' not found in Laravel when changing the namespace in Laravel?

Hello @kartik Go to config/auth.php and change App\User:class ...READ MORE

Apr 3, 2020 in Laravel by Niroj
• 82,840 points
30,169 views
0 votes
1 answer

How to manage a redirect request after a jQuery Ajax call?

Hii kartik, You can resolved this issue like ...READ MORE

Apr 27, 2020 in Java-Script by Niroj
• 82,840 points
29,045 views
+1 vote
1 answer

Error [PDOException]: Could not Find Driver in PostgreSQL?

Hii, I got this problem too. I have ...READ MORE

Mar 31, 2020 in Laravel by Niroj
• 82,840 points
29,995 views
0 votes
1 answer

I get this error > Trying to get property of non-object . How to fix it?

Hello @aakash, If you want to save grades ...READ MORE

Aug 17, 2020 in Laravel by Niroj
• 82,840 points
24,020 views
0 votes
1 answer

How do I remove quotes from a string?

Hello @kartik, Try this: str_replace('"', "", $string); str_replace("'", "", $string); Otherwise, ...READ MORE

Nov 16, 2020 in PHP by Niroj
• 82,840 points
19,812 views
0 votes
1 answer

How do I call a JavaScript function on page load?

Hello @kartik, If you want the onload method ...READ MORE

Sep 4, 2020 in Java-Script by Niroj
• 82,840 points
22,936 views
0 votes
1 answer

The stream or file "/var/www/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied

Hello @kartik, Make your Dockerfile something as below ...READ MORE

Sep 30, 2020 in Laravel by Niroj
• 82,840 points
21,479 views
0 votes
1 answer

How to save DOMPDF generated content to file?

Hii, Try this: require_once("./pdf/dompdf_config.inc.php"); $files = glob("./pdf/include/*.php"); foreach($files as $file) include_once($file); $html ...READ MORE

Nov 13, 2020 in PHP by Niroj
• 82,840 points
19,249 views
0 votes
1 answer

How can I send a message to a particular client with socket.io?

Hii, You can try the code below: io.to(socket.id).emit("event", data); whenever ...READ MORE

Apr 27, 2020 in Java-Script by Niroj
• 82,840 points
27,830 views
+1 vote
1 answer

How to delete a localStorage item when the browser window/tab is closed?

Hii @kartik, You can make use of the beforeunload event ...READ MORE

Jun 11, 2020 in Java-Script by Niroj
• 82,840 points
25,834 views
0 votes
1 answer

How to connect to SQL Server database from JavaScript in the browser?

Hello @kartik, You shouldn´t use client javascript to ...READ MORE

Jul 21, 2020 in PHP by Niroj
• 82,840 points
23,957 views
+1 vote
1 answer

How to restore/reset npm configuration to default values?

Hello @kartik, To reset user defaults Run this in ...READ MORE

Oct 12, 2020 in Node-js by Niroj
• 82,840 points
20,351 views
0 votes
1 answer

What is yield in Laravel and what is the use of yield?

Hii kartik, In Laravel, @yield is principally used to define ...READ MORE

Mar 23, 2020 in Laravel by Niroj
• 82,840 points
29,043 views
+1 vote
1 answer

How can I run specific migration in laravel?

Hello @kartik, Use this command it worked for ...READ MORE

Aug 4, 2020 in Laravel by Niroj
• 82,840 points
23,114 views
+1 vote
1 answer

How to load blade or php content into a view via ajax/jquery in laravel?

Hello @kartik, Assuming you're using jQuery... create a route ...READ MORE

Apr 14, 2020 in Laravel by Niroj
• 82,840 points
27,960 views
0 votes
1 answer

How to get original URL referer with PHP?

Hello @kartik, Store it either in a cookie or ...READ MORE

Sep 1, 2020 in PHP by Niroj
• 82,840 points
21,939 views
0 votes
1 answer

How do I get the base URL with PHP?

Hello @kartik, Try this: <?php echo "http://" . $_SERVER['SERVER_NAME'] ...READ MORE

Sep 15, 2020 in PHP by Niroj
• 82,840 points
21,259 views
0 votes
1 answer

How to set environment variables from within package.json?

Hello @kartik, Set the environment variable in the ...READ MORE

Jul 13, 2020 in Node-js by Niroj
• 82,840 points
23,955 views
0 votes
2 answers

How to catch curl errors in PHP?

For (PHP 4 >= 4.0.3, PHP 5, ...READ MORE

Nov 9, 2020 in PHP by anonymous
• 160 points
19,615 views
0 votes
1 answer

How do I redirect in expressjs while passing some context?

Hello @kartik, The easiest way I have found ...READ MORE

Jul 14, 2020 in Node-js by Niroj
• 82,840 points
23,903 views
0 votes
1 answer

How to disable all div content?

Hello @kartik, A simple way to disable any ...READ MORE

Aug 25, 2020 in Java-Script by Niroj
• 82,840 points
21,795 views
0 votes
1 answer

How can I access the MySQL command line with XAMPP for Windows?

Hello @kartik, Your MySQL binaries should be somewhere ...READ MORE

Aug 20, 2020 in PHP by Niroj
• 82,840 points
21,909 views
0 votes
1 answer

How do you import a javascript package from a cdn/script tag in React?

Hello, Go to the index.html file and import ...READ MORE

Jun 4, 2020 in Angular by Niroj
• 82,840 points
25,090 views
0 votes
1 answer

Warning: mysqli_connect(): (HY000/2002): No such file or directory in /Users/kramer65/Sites/vanilla/info.php on line 3 Failed to connect to MySQL: No such file or directory

Hello @kartik, edit these two lines in /etc/php.ini (or wherever ...READ MORE

Nov 6, 2020 in PHP by Niroj
• 82,840 points
18,342 views
0 votes
1 answer

Fatal error: Constant expression contains invalid operations

Hello @kartik, This is because a static variable ...READ MORE

Nov 8, 2020 in PHP by Niroj
• 82,840 points
18,230 views
0 votes
1 answer

How to extract request http headers from a request using NodeJS connect?

Hello @kartik, To see a list of HTTP ...READ MORE

Jul 15, 2020 in Node-js by Niroj
• 82,840 points
23,226 views
0 votes
1 answer

How to get querystring from URL using jQuery?

Hello @Kartik, The following code will return a ...READ MORE

Sep 3, 2020 in Java-Script by Niroj
• 82,840 points
20,948 views
0 votes
1 answer

How to return an array from an AJAX call?

Hello @kartik, Use JSON to transfer data types (arrays and ...READ MORE

Nov 14, 2020 in PHP by Niroj
• 82,840 points
17,347 views