CMD – CodeWeb https://codeweb.wall-spot.com Code the web easy Mon, 13 Feb 2023 10:04:34 +0000 en-US hourly 1 https://wordpress.org/?v=6.6.1 https://i0.wp.com/codeweb.wall-spot.com/wp-content/uploads/2022/06/code-web.png?fit=32%2C32&ssl=1 CMD – CodeWeb https://codeweb.wall-spot.com 32 32 214557421 How To Clear Cache In Shared Hosting Server https://codeweb.wall-spot.com/how-to-clear-cache-in-shared-hosting-server/ Thu, 15 Dec 2022 12:34:33 +0000 https://codeweb.wall-spot.com/?p=75 How to clear the cache using a link?

How to clear the cache in a shared hosting server?

It happens a lot when you are developing applications and the functions do not work. Most of the time it is because of cache as we do in web browsers. Similar way you do in the project.

Clear cache CMD

Using CMD it is simple to call.

Clear cache:

php artisan cache:clear

Clear route cache:

php artisan route:cache

Clear view cache:

php artisan view:clear

Clear config cache:

php artisan config:cache

Do this to make all:

php artisan optimize:clear

The same in the shared hosting with a link

Clear cache:

Route::get('/clear-cache', function() {
     $cache = Artisan::call('cache:clear');
     return 'CAche facade value cleared';
});
]]>
75
Livewire Does Not Work https://codeweb.wall-spot.com/livewire-does-not-work/ Sun, 11 Dec 2022 11:15:43 +0000 https://codeweb.wall-spot.com/?p=70 Livewire does not work?

Livewire simple live search does not work?

Livewire

Livewire gives Laravel easy to set up javascript actions in your project. You complete the action without refreshing the page. For live search results, quick like and dislike buttons or even CRUD.

Why it does not work in my project?

Well, it is very simple to install and ready for your project. But in some cases, you would need to remove the cache from your laravel project.

So do this in your CMD: php artisan optimize:clear

You can clear the route, cache, and others one by one, but the above command will make it all in once.

Livewire clear cache

Clear views. Application cache, Route cache, and Config cache in one command.

Still not working?

You still face the same as given in the below image, then do one more step.

Put this in CMD: composer dumpautoload

If you still face the same problem do these.

New setup require you to publish the config file. To serve the javascript by your web server, use the php artisan livewire:publish --assets

php artisan livewire:publish --config
php artisan livewire:publish --assets
Livewire not working

In the above image, you see the message appears but the text box has no text.

Works here properly

You can see in the below image the message changed according to the textbox.

Livewire working

Final

Clear cache: php artisan optimize:clear

Dump: composer dumpautoload

]]>
70
How To Check PHP Version In CMD? https://codeweb.wall-spot.com/how-to-check-php-version-in-cmd/ Fri, 10 Jun 2022 05:16:13 +0000 https://codeweb.wall-spot.com/?p=28 If there is a way to see the version of PHP software I have installed? How to check the PHP version on my computer?

Solution

You can check the PHP version on your computer. To do so, you have to go to the directory where the PHP has been installed.

Like in XAMPP software, we have htdocs where you can see the PHP folder.

So, the command is php -v and you should put it in htdocs dir through CMD like below:

C:\xampp\htdocs\php -v
Check php version in cmd

As you see in the above image, the result is the same.

You can see the PHP version using the command in your project directory or just go to htdocs and place the command.

]]>
28
CD.. Does Not Work On CMD https://codeweb.wall-spot.com/cd-does-not-work-on-cmd/ Fri, 10 Jun 2022 04:50:36 +0000 https://codeweb.wall-spot.com/?p=16 CD.. in command prompt is used to change the directory. In any case, if it does not work you should follow this step.

In command prompt(CMD) we use several commands, one is CD.. to go back one step.

C:\xampp\htdocs\CodeWeb

By using cd.. you got this:

C:\xampp\htdocs

Error message

The error message comes when you use the simple easy command cd.. which is to go back one step. And it shows the error like below.

'cd..' is not recognized as an internal or external command,
operable program or batch file.

Solution

cd.. does not work cmd

Use the same command with a space after CD

Instead of using cd.. use cd ..

You see here a space between CD and .. (two dots).

]]>
16