Posts

Deploy Angular Project with CI /CD to Hostinger with FTP

 1. creat a folder in your project root folder with name .github 2. create second folder in .github/workflows 3. create file in your .github/workflows/main.yml paste this code in main.yml file on :   push :     branches : main <--- select your branch name name : 🚀 Deploy website on push jobs :   web-deploy :     name : 🎉 Deploy     runs-on : ubuntu-latest     steps :     - name : 🚚 Get latest code       uses : actions/checkout@v3     - name : Use Node.js 18       uses : actions/setup-node@v2       with :         node-version : '18'           - name : 🔨 Build Project       run : |         npm install               npm run build       - name : 📂 Sync files       uses : SamKirkland/FTP-Deploy-Action@v4.3.4   ...

Sweet Alert

<link rel="stylesheet" type="text/css"  href="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.css"> <script src="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/js/toastr.min.js"></script> <script>  / $(function() {     @if(Session::has('success'))     toastr.options = {         "closeButton": true,         "progressBar": true,     }     toastr.success("{{ session('success') }}")     @endif }); </script>

Decode Base64 image in html page

  < td >< img style = " width:100px;height:30px" src = " {{ 'data:image/png;base64,' . base64_encode ( file_get_contents ( public_path ('images/expenses/' .@ $list -> image ))) }} " alt = "Image" > </ td >

UPI QR code payment Gateway

  API :https://upiqr.in/ https://upiqr.in/api/qr?name=Krishna%20Bhardwaj&vpa=9140934715@ybl&amount=100

Change sql collation

 CHARACTER SET utf8 COLLATE utf8_unicode_ci;

get current date in laravel

First  method  to get current date ------- 1st step :  use Carbon\Carbon; 2nd step :    $today = \Carbon\Carbon::now()->format('Y-m-d').'%'; Second method to get current date ......    $date = \Carbon\Carbon::now();   $date =  \Carbon\Carbon::create($date , 'Asia/Kolkata');  $c_date = \Carbon\Carbon::createFromDate($date->year, $date->month,$date->day)->format('Y-m-d');

Select2 dropdown

for referrence :  https://select2.org/dropdown  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.13/css/select2.min.css" integrity="sha512-nMNlpuaDPrqlEls3IX/Q56H36qvBASwb3ipuo3MxeWbsQB1881ox0cRv7UPTgBlriqoynt35KjEwgGUeUXIPnw==" crossorigin="anonymous" referrerpolicy="no-referrer" /> <script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.13/js/select2.min.js" integrity="sha512-2ImtlRlf2VVmiGZsjm9bEyhjGW4dU7B6TNwh/hx/iSByxNENtj3WVE6o/9Lj4TJeVXPi4bnOIMXFIJJAeufa0A==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> Note * : <select name="reporting_to" class="form-select js-example-templating"  required> function formatState ( state ) { if (! state . id ) { return state . text ; } var baseUrl = "/user/pages/images/flags" ; var $state = $ ( '<span><img...

Calculate time in between to date and time in laravel

//  add this   on  top     use Carbon\ Carbon ; use DateTimeInterface ;     $starTime = $data -> check_in_time ; //dynamic value         // This is for start date by backend         $stopTime = Carbon :: now ();         // It is of diffence of time         $t1 = strtotime ( $starTime );         $t2 = strtotime ( $stopTime );         $hours = ( $t2 - $t1 )/ 3600 ;         $calculationTime = floor ( $hours ) . ' Hour ' . floor ( ( $hours - floor ( $hours )) * 60 ). ' Minutes' ;

Popular posts from this blog

Ms Office 2019 activation link