Categories
Laravel

Laravel BackPack – Tutorial

   745  composer require backpack/crud:"4.0.*"
   746  composer require backpack/generators --dev
   747  composer require laracasts/generators --dev
   748  php artisan backpack:install
   749  php artisan make:migration:schema create_tags_table --model=0 --schema="name:string:unique"
   750  php artisan migrate
   751  php artisan backpack:crud tag
   752  valet park
   753  valet link
   754  valet links
   755  hisory
   756  history
   757  vim .env
   758  php artisan backpack:crud building
   759  php artisan backpack:crud apartment
   760  php artisan backpack:crud apartment
   

Additionnal Feature

  830  composer require backpack/permissionmanager
  831  php artisan vendor:publish --provider="Spatie\Permission\PermissionServiceProvider" --tag="migrations"
  832  php artisan migrate
  833  php artisan migrate
  834  php artisan vendor:publish --provider="Spatie\Permission\PermissionServiceProvider" --tag="config"
  835  php artisan vendor:publish --provider="Backpack\PermissionManager\PermissionManagerServiceProvider"

BackPack links

  853  php artisan backpack:add-sidebar-content "<li class='nav-item'><a class='nav-link' href='{{ backpack_url('setting') }}'><i class='nav-icon fa fa-cog'></i> <span>Settings</span></a></li>"
  854  Discovered Package: creativeorange/gravatar
  855  composer require backpack/logmanager
  856  php artisan backpack:add-sidebar-content "<li class='nav-item'><a class='nav-link' href='{{ backpack_url('log') }}'><i class='nav-icon fa fa-terminal'></i> Logs</a></li>"
  857  composer require backpack/backupmanager
  858  php artisan vendor:publish --provider="Backpack\BackupManager\BackupManagerServiceProvider"  --tag=config
  859  php artisan backpack:add-sidebar-content "<li class='nav-item'><a class='nav-link' href='{{ backpack_url('backup') }}'><i class='nav-icon fa fa-hdd-o'></i> Backups</a></li>"
  860  composer require seandowney/backpackgallerycrud
Categories
Technical

Best File compression

First, we installed Bastion and compressed its folder — about 863 MB in size of music, graphics, executable files, and various different types of documents:

  • Zip (Windows 8.1): 746 MB (86.4% of the original size)
  • Zip (WinZip): 745 MB (86.3% of the original size)
  • RAR (WinRAR): 746 MB (86.4% of the original size)
  • 7z (7-Zip): 734 MB (85% of the original size)

Next, we compressed Hotline Miami, which is 654 MB of data:

  • Zip (Windows 8.1): 316 MB (48.3% of the original size)
  • Zip (WinZip): 314 MB (48% of the original size)
  • RAR (WinRAR): 307 MB (46.9% of the original size)
  • 7z (7-Zip): 301 MB (46% of the original size)

Categories
Laravel

Laravel Back pack tutorial

Install important package

  #1  composer require backpack/crud:"4.0.*"
  #2  composer require backpack/generators --dev
  #3  composer require laracasts/generators --dev
  #4  php artisan backpack:install

#5 php artisan make:migration:schema create_tags_table --model=0 --schema="name:string:unique"
  
#6 php artisan migrate
  
#7 php artisan backpack:crud tag

Categories
MySql

How to fix – DBeaver Native client is not specified for connection ?

Native client is not specified for connection

Download Mysql or Postgres or (appropriate database ) Server

Do the step of DBEAVER client configuration

Find bib files for mysql – open terminal and execute followin command

which mysql
--> /usr/local/bin/mysql

if using a mac to allocate mysql server bin files location

command + shift + G

Paste the path in there such as

/usr/local/mysql-5.7.28-macos10.14-x86_64/bin/

Voila you can enjoy most amazing feature of DBeaver !

Categories
BEST PHP CODE EasyPhp PHP

What to do – PHP session slow ?

Solution

Increase memory size

memory_limit = 2048M
Categories
PHP

PHP Xcache to be light fast

yum install php xcache – light fast application

 yum install php54-xcache.x86_64
Categories
AWS

AWS – How to Unmount Volumes ?

Make sure the volume isn’t in use.

sudo lsof +f -- /mnt/use_your_mount_point

Kill processes pid

kill -9 pidNumber

umount

sudo umount --verbose /mnt/use_your_mount_point
Categories
AWS

How to mount duplicate uuid aws volume ?

Error

[128456.266831] XFS (xvdg): Filesystem has duplicate UUID 483f88bd-990a-404d-8408-71218fa83324 - can't mount

Solution

mount -o nouuid /dev/sdb7 /yourfolder
Categories
MySql

Mysql Open remote access

Connect

mysql -u root -p
USE mysql;
SELECT user,host FROM user;

grant privileges

from specific IP

GRANT ALL PRIVILEGES ON *.* TO [email protected]_ip IDENTIFIED BY ‘root_password‘ WITH GRANT OPTION;

From everywhere

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY ‘root_password‘ WITH GRANT OPTION;

Flush privileges

FLUSH PRIVILEGES;
Categories
Technical

How to collapse swagger tag categories by default ?

Add docExpansion:'true', in the file swagger/index.php

 <script>
    window.onload = function() {
      // Begin Swagger UI call region
      const ui = SwaggerUIBundle({
        //url: "http://davidr3.sbx.4over.com/swagger.json",
        url: "../swagger.json",
        dom_id: '#swagger-ui',
        docExpansion:'true',
        deepLinking: true,
        presets: [
          SwaggerUIBundle.presets.apis,
          SwaggerUIStandalonePreset
        ],
        plugins: [
          SwaggerUIBundle.plugins.DownloadUrl
        ],
        layout: "StandaloneLayout"
      })
      // End Swagger UI call region

      window.ui = ui
    }
  </script>