Managing users in Laravel 5.2

There are different ways you can manage users in Laravel 5.2. Their documentation at www.laravel.com is a great resource.

15thMay 2014


Created

Working with Dates & Hours

Date & hours come in handy when you need to work for something like booking system or calendar or reminder application.

<code>

<?php

$daysInWeek = array('Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday');
?>
<table class="table table-bordered">
<tr>
    <?php
    foreach($daysInWeek as $din){
        echo '<td>'.$din.'</td>';
    }
    ?>
</tr>

<?php
    
    echo '<a href="index.php?month=2&year=2016">Prev</a><br/>';
    $month = date('m');
    $year = date('Y');
    $totalDays = cal_days_in_month(CAL_GREGORIAN, $month, $year);
    $currentTimestamp = mktime(0, 0, 0, $month, 28, $year);
    $counter = 0;
    echo date('F', $currentTimestamp).' | '.$year.'<br/>';

   

    
    

    for($d=1; $d<=$totalDays; $d++, $counter++)
    {
        $time=mktime(0, 0, 0, $month, $d, $year);
        $firstDay = date('w', $time).' ';          
        
            if($d == 1 ) {
                
                for($j = 1; $j<$firstDay; $j++, $counter++){
                    echo "<td>&nbsp;</td>"; 
                }
                
            } 
            
            
            
            if( $counter%7 == 0 ){

                echo '</tr><tr>';
            }

            echo '<td id="tabledata" onmouseover="showHours('.$d.');">';
            echo $d;
            
            //echo '$100<br/>';
            //foreach($slots as $st){
            //   echo $st.'<br/>';
            //}
            echo '</td>';
            
    } // end of for loop


    echo "<tr/></table>";

?>

</code>

15thMay 2014


Created

Working with Google maps

Google maps with geolocation for tracking the user location and get content accordingly.

How to get the country name using latitude & longitude?

 

$deal_lat=-37.759628;
$deal_long=144.929291;
$geocode=file_get_contents('http://maps.googleapis.com/maps/api/geocode/json?latlng='.$deal_lat.','.$deal_long.'&sensor=false');

$output= json_decode($geocode);

for($j=0;$jresults[0]->address_components);$j++){
           $cn=array($output->results[0]->address_components[$j]->types[0]);
           if(in_array("country", $cn))
           {
            $country= $output->results[0]->address_components[$j]->long_name;
           }
 }
echo $country;

How to get current location with movable marker and get the value in a text field?

<code>

<div id="map"></div>
    <script>
      function initMap() {
          var myLatLng = {lat: -37.706291, lng: 144.91165};

        var mapDiv = document.getElementById('map');
        
        var map = new google.maps.Map(mapDiv, {
          center: myLatLng,
          zoom: 14
        });

        var marker = new google.maps.Marker({
            position:myLatLng,
            draggable:true,
            map:map,

        });

        google.maps.event.addListener(marker, 'dragend', function (event) {
            document.getElementById("latbox").value = this.getPosition().lat();
            document.getElementById("lngbox").value = this.getPosition().lng();
        });

        
      }
    </script>
    <script src="https://maps.googleapis.com/maps/api/js?callback=initMap"
        async defer></script>


    <div id="latbox"><input type="text" id="lngbox" /></div>

</code>

15thMay 2014


Created

Preston Hill Estates Agent

Preston Hill Estates Agent - real estate agents based on United Kingdom. Based on the clients' requirement, the project was development of a complete website with 4 types of users and feed to Zoopla.co.uk for each property. 

Responsibilities:

  1. Complete website design
  2. Development with PHP, MySQL
  3. Interaction with clients
  4. Multiple user profile
  5. Property search
  6. Usability

15thMay 2014


Created


About me

I'm Subash Thapa (web developer, freelancer, designer).

Web development has been my passion from the day I started using computer. I can help you from the first stage of website i.e designing, programming(developing) till the last stage or deployment, including domain name registration and hosting.

I would love to get engaged in any type of website to design, develop or maintenance.