Posts

Showing posts from September, 2020

Purge Tailwind CSS

npm install laravel-mix-purgecss --save-dev Then install the extension by requiring the module in your Mix configuration. const   mix   =   require ( ' laravel-mix ' ) ; require ( ' laravel-mix-purgecss ' ) ;   //  ... PurgeCSS can be enabled by calling  .purgeCss()  in your Mix chain. mix . js ( ' resources/js/app.js ' ,   ' public/js ' )     . sass ( ' resources/sass/app.scss ' ,   ' public/css ' )     . purgeCss ( ) ;

Steps to Install XAMPP on your Ubuntu

 1. download the XAMPP from https://www.apachefriends.org/index.html 2. $ cd /home/[username]/Downloads 3. $ chmod 755 xampp-linux-x64-7.2.10-0-installer.run 4. $ ls -l xampp-linux-x64-7.2.10-0-installer.run (it is important to verify if the package can be executed by the current user)  5. sudo ./xampp-linux-7.2.10-0-installer.run 6.$ sudo /opt/lampp/lampp start ( To Launch) If it gives message netstat not found then install $ sudo apt install net-tools      

Install Php 7.3 on Ubuntu 20

mysql SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost'.md sudo mysql -u root mysql> USE mysql; mysql> UPDATE user SET plugin='mysql_native_password' WHERE User='root'; mysql> FLUSH PRIVILEGES; mysql> exit; service mysql restart For use Vscode for saving files sudo chown -R myuser /path/to/folder     Using Laravel to Deploy an Application On the contrary, if we are going to use our VPS as the server of a Laravel application, then we have to make some adjustments to avoid problems. First, we need to move the previously created project directory to the Apache web root. Remember, in our case, the folder name is Example. Execute the following command: sudo mv example /var/www/html/ After that, se...

Create Storage link on Shared Hosting

 1. Normally use php artisan storage:link  if use have ssh access if php artisan doesnot work then manully  ln -s /home/u301157799/domains/opsmaihar.in/public_html/storage/app/public/posts /home/u301157799/domains/opsmaihar.in/public_html/public/storage 2 . Create a file in your public_html file with a name (eg symlink.php) with the code below < ?php $linkName = '/home/username/public_html/innovativetechsolution.in/innovation/public/storage'; $target = '/home/username/public_html/mydomain.com/storage/app/public/myfolder1'; symlink($target, $linkName); ?>   3. Simplest one is  Route::get( '/symlink' , function () { Artisan::call( 'storage:link' ); }); Clearing CAhches on Shared Route::get('/clear-cache', function() { Artisan::call('cache:clear'); return '<h1>Cache facade value cleared</h1>'; }); //Reoptimized class loader: Route::get('/optimize', function() { Artisan::call('opt...