Posts

How to Change Cursor on Hover in CSS

 <!DOCTYPE html> <html> <head> <style> .alias {cursor: alias;} .all-scroll {cursor: all-scroll;} .auto {cursor: auto;} .cell {cursor: cell;} .context-menu {cursor: context-menu;} .col-resize {cursor: col-resize;} .copy {cursor: copy;} .crosshair {cursor: crosshair;} .default {cursor: default;} .e-resize {cursor: e-resize;} .ew-resize {cursor: ew-resize;} .grab {cursor: -webkit-grab; cursor: grab;} .grabbing {cursor: -webkit-grabbing; cursor: grabbing;} .help {cursor: help;} .move {cursor: move;} .n-resize {cursor: n-resize;} .ne-resize {cursor: ne-resize;} .nesw-resize {cursor: nesw-resize;} .ns-resize {cursor: ns-resize;} .nw-resize {cursor: nw-resize;} .nwse-resize {cursor: nwse-resize;} .no-drop {cursor: no-drop;} .none {cursor: none;} .not-allowed {cursor: not-allowed;} .pointer {cursor: pointer;} .progress {cursor: progress;} .row-resize {cursor: row-resize;} .s-resize {cursor: s-resize;} .se-resize {cursor: se-resize;} .sw-resize {cursor: sw-resize;} .text

Laravel Login & Logout Using Session & Middleware

 Create Middleware : LoginMiddleware  <?php namespace   App\Http\Middleware ; use   Closure ; use  Illuminate\Http\ Request ; use  Illuminate\Support\Facades\ Session ; class   LoginMiddleware {      public   function   handle ( Request   $request ,  Closure   $next )     {          if (! $user  =  Session :: get ( 'user' )){              return   redirect ( 'login' );         } else  {              return   $next ( $request );         }     } } Now Register Middleware in App/Http/kernal.php     protected   $routeMiddleware  = [           'loginAuth'  => \App\Http\Middleware\ LoginMiddleware :: class ,     ]; Now In Web.php Route :: get ( '/' , 'LoginController@index' )-> name ( 'login' ); Route :: get ( '/login' , 'LoginController@index' )-> name ( 'user-login' ); Route :: get ( '/logout' , 'LoginController@logout' )-> name ( 'logout' ); Route :: post ( 'login-process'

How to use Costom Library in laravel

Route: Route :: group ([ 'prefix' => '' , 'namespace' => 'Front' ] , function (){ Route :: get ( '/' , 'NewsController@index' ); }); Controller : <?php namespace App\Http\Controllers\Front ; use App\Http\Controllers\Controller ; use App\Library\API\News_Api ; use Illuminate\Http\Request ; class NewsController extends Controller { public function index (){ $news_details = []; $news = ( new News_Api ())-> News_get ( $news_details ); dd ( $news ); } } Library : <?php namespace App\Library\API ; use GuzzleHttp\Client ; class News_Api { function News_get ( $news_details ){ $news = ( new Client ())-> request ( 'GET' , env ( 'NEWS_BASE_URL' ) ,[ 'query' => [ 'query1' => '' ] ]); return json_decode ((string) $news -> getBody ()); } }

crud operation in codeigniter

Download File Controller: function subitem(){ if($this->session->userdata('username')){ $id=$this->uri->segment(3); if($this->input->post('Submit')){ $data=array( 'subitem_itemname'=>$this->input->post('miname'), );//print_r($data);die();   $this->Item_model->insert_subitem($data); }elseif($this->input->post('Update')){ $data=array( 'subitem_id'=>$this->input->post('subitem_id'), 'subitem_itemname'=>$this->input->post('miname'), ); //print_r($data);die(); $this->Item_model->update_subitem($data); }elseif($id){ $data=array( 'subitem_id'=>$id, 'subitem_active'=>0 ); $this->Item_model->delete_subitem($data); } $data['view_item']=$this->Item_model->view_item(); $data['view_itemoption'

Push Notification in Android using Firebase (FCM) and PHP

Creating PHP Project 1.  Start WAMP/XAMPP server and navigate to  www  or  htdocs  folder and create a folder named  firebase  inside it. Inside this folder, create a subfolder called  notifications 2.  Now create a file named  notification.php  inside  notifications  folder. This will have Notification class which will help in constructing the notification data payload. notification.php PHP 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 <?php class Notification { private $title ; private $message ; private $image_url ; private $action ; private $action_destination ; private $data ; function __construct ( ) {          } public function setTitle ( $title ) { $this -> title = $title ; } public functi