jeevamugunthan

jeevamugunthan

Software Engineer at Technology Species

Member Since 3 Weeks Ago

coimbatore

Experience Points
1,930
Total
Experience

3,070 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed
0
Lessons
Completed
Best Reply Awards
1
Best Reply
Awards
  • start your engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-in-session Created with Sketch.

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • subscriber Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • evangelist Created with Sketch.

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • chatty-cathy Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

Level 1
1,930 XP
Mar
30
3 days ago
Activity icon

Replied to Image Update Problem

use this

$data = $request->image.$request->image->getClientOriginalExtension();
Activity icon

Replied to Unique Date Validation

@sti3bas yeah i'm already know normal unique validation i want to know how to validate date of these two column's limit

Activity icon

Started a new Conversation Unique Date Validation

hello everyone in my database i have columns called due_from and due_to. in this i update trem the field like

due_from=01-01-2020

due_to=01-06-2020

its fine now i want to validate this when i update new row if i set same duration or set like 01-04-2020 to 01-07-2020 it must be intimate its worng

if my new date is not in the limit of old date it will be update otherwise it fails how to do this

thanks in advance

Mar
27
6 days ago
Activity icon

Replied to Field Doesn't Have A Default Value, Even If Specified

can u please show this file

\App\Seat
Mar
26
1 week ago
Activity icon

Replied to Make A Foreign Key Column Nullable In Migration File

@zizi_ove no its making column nullable use this

Firstly you have to make your user_id field an index:

$table->index('user_id');

After that you can create a foreign key with an action on cascade:

$table->foreign('user_id')->references('id')->on('users');
Activity icon

Replied to Google Pay Api Integration

@prasadchinwal5 this is one apartment app i'm the super admin i give access to master admin the master admin is apartment holder and the users is flat users ok.

in this some payments will transation with the master admin and flat users for example maintenance charges like that , there is multiple apartments so how i implement gateway for each apartment this my question, this is possible...?

Activity icon

Replied to Redirect Not Working

try this

return redirect()->route('route.name', [$param]);
Activity icon

Started a new Conversation Google Pay Api Integration

hello everyone , im using laravel in my project there is one superadmin and multiple master admin and multiple user for each marster admin, but i didnt use subdomain for each user there is only one domain for all users.

in this i want to make payment gateway for each marster admin and their user, is it possible anyone please tell me if its not possible, is there any other way to implement this

Mar
25
1 week ago
Activity icon

Started a new Conversation How To Send Image File With Serialize From Data Via Ajax

my code is

    function paymake(id){
        var dataimg = new FormData();
        var files = $('#img_proof')[0].files[0];
        dataimg.append('img_proof',files);
        $.ajax({
            url: "{{ route('paymake') }}",
            method: 'post',
            data:$('#multi_pay').serialize() +" &dataimg="+dataimg+ "&_token={{csrf_token()}}",
            success: function(data){

            }

        });
    }

i got result in header like

dataimg=[object FormData]

anybody know this

Mar
24
1 week ago
Activity icon

Replied to How To Display Inner Array Values In View Blade

@sti3bas again sorry fr distrubing u its working fine thank you very much

Activity icon

Replied to How To Display Inner Array Values In View Blade

@sti3bas sorry its not working fine its return the same value 2 times and it only shows id column only if i tried to take any other column datas, i got unknown field error

Activity icon

Replied to How To Display Inner Array Values In View Blade

i done with this

@for($i=0;$i<$count2;$i++)
                @foreach($data2[$i] as $data)
                    <p>{{$data['id']}}</p>
                @endforeach
            @endfor

its working

Activity icon

Replied to Change The Input Type Date From MM/DD/YYYY To YYYY/MM/DD

i think you have datepicker just change your format like

$('#due_from').datepicker({
      format: "yyyy/mm/dd",
      todayHighlight: true,
      autoclose: true
    });
Activity icon

Replied to Make A Foreign Key Column Nullable In Migration File

try this

Schema::table('users', function($table)
{
    $table->string('name', 50)->nullable()->change();
});
Activity icon

Replied to Bootstrap Tab - All Tabs Active Inside Foreach

can you please show me your controller

Activity icon

Started a new Conversation How To Display Inner Array Values In View Blade

i fetched data from database by this code

$count2=count($request['paymento']);
for($i=0;$i<$count2;$i++){
            $data2[]=Otherpayment::get()->where('id','=',$request['paymento'][$i])->toArray();
        }
return view('flatuser.request.view_payment',compact('data2','count2'));

and result of data2 is

Array (

[0] => Array ( [0] => Array ( [id] => 1 [admin_id] => 11 [r_apname] => Hogwards [r_acc_name] => manoj [r_acc_no] => 207487876587658 [r_ifsc_code] => HG00065GH [country_id] => INR [r_mobile] => 8973488181 [c_title] => elevator repairs [c_budget] => 4500 [share_amount] => 4500 [message] => [cut_off_date] => 2020-04-24 [created_at] => 2020-03-24 07:05:00 [updated_at] => 2020-03-24 07:27:35 [status] => 0 [is_primary] => 0 ) )

[1] => Array ( [1] => Array ( [id] => 2 [admin_id] => 11 [r_apname] => Hogwards [r_acc_name] => manoj [r_acc_no] => 207487876587658 [r_ifsc_code] => HG00065GH [country_id] => INR [r_mobile] => 8973488181 [c_title] => painting charges [c_budget] => 3500 [share_amount] => 3500 [message] => [cut_off_date] => 2020-04-24 [created_at] => 2020-03-24 07:34:15 [updated_at] => 2020-03-24 07:34:15 [status] => 0 [is_primary] => 0 ) ) )

and my count result is 2

i want to display this datas in my view blade

my code is

@for($i=0;$i<$count2;$i++)
                <p>{{$data2[$i]['id']}}</p>
            @endfor

any body know this

Mar
23
1 week ago
Activity icon

Replied to How To Get Data From Database Where Current Date Is In Between From And To Date

@deansatch yes i'm sure i get values when i use this query

$maintenance=maintenance::get()->where('admin_id', '=', $admin_id)->toArray();

and in my db the due_from and due_to column dates are

due_from=2020-03-01 and

due_to=2020-03-31

and the current date is 2020-03-23

Activity icon

Replied to How To Get Data From Database Where Current Date Is In Between From And To Date

@deansatch yes i tried this already i'm getting empy array value only

Activity icon

Replied to How To Get Data From Database Where Current Date Is In Between From And To Date

@deansatch haahaa ok fine after copied your last answer again i got error

SQLSTATE[42S22]: Column not found: 1054 Unknown column '2020-03-23' in 'where clause' (SQL: select * from `maintanance` where `admin_id` = 11 and `2020-03-23` between due_from and due_to)

its assume current date as column

Activity icon

Replied to How To Get Data From Database Where Current Date Is In Between From And To Date

@deansatch i tried this but i got error

Call to undefined method Illuminate\Database\Eloquent\Builder::toArray()
Activity icon

Started a new Conversation How To Get Data From Database Where Current Date Is In Between From And To Date

my code is

$current_date=date('Y-m-d');

            $maintenance=Maintenance::get()->where('admin_id', '=', $admin_id)->whereBetween($current_date, ['due_from', 'due_to'])->toArray();

but i get an empty array value

any body know how to fetch this

Activity icon

Replied to Best Way To Save An Array In A Db

impolde is best for store array values to database like

		$name_arr[]=$request['c_name'];
               
                for ($i=1; $i <=$request['customer_length'] ; $i++) {
                $name_arr[] = $request['c_name'.$i];
               
		user::create([
		'c_name'=>implode(",",$name_arr ),
		]);

if you want yo fetch data, u need to explode the data and get

Mar
22
1 week ago
Activity icon

Replied to If I Try To Delete Table-rows With A Skip It Deletes All Rows In The Table :(

you need to delete all rows without latest 3 rows right then how u set $count=1 its not right, so you need to take total table count the count is must be atleast 4

Activity icon

Awarded Best Reply on If I Try To Delete Table-rows With A Skip It Deletes All Rows In The Table :(

or try this

NextTitle::latest()->take($count)->skip(3)->get()->each(function($row){ $row->delete();});

Activity icon

Replied to If I Try To Delete Table-rows With A Skip It Deletes All Rows In The Table :(

or try this

NextTitle::latest()->take($count)->skip(3)->get()->each(function($row){ $row->delete();});

Activity icon

Replied to If I Try To Delete Table-rows With A Skip It Deletes All Rows In The Table :(

you need to get count of your table like

$count=NextTitle::count();
Activity icon

Replied to If I Try To Delete Table-rows With A Skip It Deletes All Rows In The Table :(

you need to take count of table first and store it into $count and

NextTitle::latest()->take($count)->skip(3)->delete();
Activity icon

Replied to Undefined Variable - Laravel 7 - Components

@diegoarbelaez ok fine do this it maybe works

inject your controller in header blade like

@inject('pro', 'App\Http\Controllers\DashboardController')
{{$pro->__construct() }}

Mar
21
1 week ago
Activity icon

Replied to Undefined Variable - Laravel 7 - Components

you need to send page_title variable to your header blade

please show your route

Activity icon

Replied to How To Make Button Redirect To A Page

@noblemfd try this it will work

<a href=" "><button class="bg-transparent text-grey-darkest font-bold uppercase tracking-wide py-3 px-6 border-2 border-grey-light hover:border-grey rounded-lg"> Go Home</button></a>

make href empty it will redirect the same page

Mar
20
1 week ago
Activity icon

Replied to Laravel Unique Rules For Multiple Columns

@noblemfd no problem just add this in your controller

use Illuminate\Http\Request;

it will work

Activity icon

Replied to Laravel Unique Rules For Multiple Columns

try this

before use this in your conroller

use Illuminate\Support\Facades\Validator;

public function rules(Request $request)
    {
$validator = Validator::make($request->all(), [
            'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],
            ]);
}

here users is a table name

Activity icon

Replied to How To Send Image File Via Ajax

@sti3bas thankyou verymuch its working

Activity icon

Started a new Conversation How To Send Image File Via Ajax

hii.. im using laravel ,i want to send image file to contorller via ajax method

<input type="file" class="custom-file-input" id="img_proof">
<script>
function paymain(id){
        var dataimg = new FormData();
        dataimg.append('img', $("#img_proof"+id)[0].files[0]);
                $.ajax({
            url: "{{route('paymain')}}",
            method: 'post',
            data: {id:id,dataimg:dataimg,_token: '{{csrf_token()}}'},
            success: function(data){
            }
        });
    }

its not working please give me a solution thanks in advance

Mar
18
2 weeks ago
Activity icon

Replied to Footer Not Sticking To The Bottom Of Page

@snapey ok thankyou for your information

Activity icon

Replied to Footer Not Sticking To The Bottom Of Page

@snapey haa..haaa.. yeah sure i tried many times it was not aling properly sorry for this

Activity icon

Awarded Best Reply on Anybody Knows?? How To Return Multiple Values To Inject

@bobbybouwmann thankyou for your reply i solved this problem by sending these variables in array like

$res=array('result'=>$result,'maintenance'=>$maintenance,'otherpayment'=>$otherpayment);
    return  $res;

and in my view blade

		<?php $res='' ;
                       $res=$pro->notification();?>
                      @if($res['result']=='found')

its working fine.

Activity icon

Replied to Anybody Knows?? How To Return Multiple Values To Inject

@bobbybouwmann thankyou for your reply i solved this problem by sending these variables in array like

$res=array('result'=>$result,'maintenance'=>$maintenance,'otherpayment'=>$otherpayment);
    return  $res;

and in my view blade

		<?php $res='' ;
                       $res=$pro->notification();?>
                      @if($res['result']=='found')

its working fine.

Activity icon

Replied to Footer Not Sticking To The Bottom Of Page

Registration
<!-- MATERIAL DESIGN ICONIC FONT -->



<!-- STYLE CSS -->
<link rel="stylesheet" href="{{asset('assets/login/css/loader.css')}}">
<link rel="stylesheet" href="{{asset('assets/login/css/style.css')}}">
<div id="content">
                @yield('content')
</div>
    <!-- core:js -->
<script src="{{asset('assets/login/js/jquery-3.3.1.min.js')}}"></script>

<!-- JQUERY STEP -->
<script src="{{asset('assets/login/js/jquery.steps.js')}}"></script>
<script src="{{asset('assets/login/js/main.js')}}"></script>
<script src="https://cdn.jsdelivr.net/jquery.validation/1.16.0/jquery.validate.min.js"></script>
<script type="text/javascript" src="{{asset('assets/js/notify.min.js')}}"></script>
<script type="text/javascript" src="{{asset('assets/js/notify.js')}}"></script>
<!-- Template created and distributed by Colorlib -->
<!-- endinject -->
<!-- end custom js for this page -->
<script type="text/javascript">
    document.onreadystatechange = function () {
     
           document.getElementById('content').style.visibility="hidden";
            
            setTimeout(function(){
             // document.getElementById('interactive');
            document.getElementById('preloader').style.visibility="hidden";
             document.getElementById('content').style.visibility="visible";
          },2000);
      }
   
</script>
 @yield('footercontent')

then in your blade add like this

@extends('layouts.header')

@section('content')

<div class="page-content">
   
    
</div>

@endsection

@section('footercontent')

$("#set_m").on('click',function(){ var id=$("#auth_id").val(); if(!$("#set_maintenance").valid()){ return false; } $.ajax({ url: "{{ route('create_charges') }}", method: 'post', data:$("#set_maintenance").serialize() + "&_token={{csrf_token()}}", success: function(data){ $.each(data.errors, function(key, value){ $.notify(value,"error"); }); if(data.success){ $.notify("Account data successfully Updated","success"); $("#set_maintenance")[0].reset(); } } }); });

@endsection

Activity icon

Started a new Conversation Anybody Knows?? How To Return Multiple Values To Inject

in my controller i have 2 functions

public function getprofile(){

    $role=Auth::user()->role_id;
    $logged_role=Userrole::get()->where('role_id','=',$role)->first();
    $result=$logged_role['role_name'];
    return $result;

public function notification(){

    $id=Auth::user()->apartment_id;
    $ap_name=Apartment::get()->where('apartmentid','=',$id)->first();
    $name=$ap_name['apartment_name'];
    $user=User::get()->where('apartment_name','=',$name)->first();
    $admin_id=$user['id'];
    if ((Maintenance::where('admin_id', '=', $admin_id)->count() > 0)||(Otherpayment::where('admin_id', '=', $admin_id)->count() > 0)) {
        $result='found';
    }else{
        $result='notfound';
    }

    if($result=='found'){
        $maintenance=Maintenance::get()->where('admin_id', '=', $admin_id)->toArray();
        $otherpayment=Otherpayment::get()->where('admin_id', '=', $admin_id)->toArray();

    }else{
        $maintenance='';
        $otherpayment='';
    } 

              return ['result'=>$result,'maintenance'=>$maintenance,'otherpayment'=>$otherpayment];

}

i want to return $result $maintenance and $otherpayment to view blade

in my blade i inject this controller

@inject('pro', 'App\Http\Controllers\DashboardController')

@if($pro->notification()->$result =='found')

                          <a href="javascript:;" class="dropdown-item">
                              <div class="icon">
                                  <i class=" link-icon fas fa-tags"></i>
                              </div>
                              <div class="content">
                                  <p>New Payment Recived</p>
                                  <p class="sub-text text-muted">2 sec ago</p>
                              </div>
                          </a>
                          @else
                      <a href="javascript:;" class="dropdown-item">
                          <div class="icon">
                              <i class="link-icon far fa-frown"></i>
                          </div>
                          <div class="content">
                              <p>No new notifications</p>
                        <p class="sub-text text-muted">2 sec ago</p>
                          </div>
                      </a>

i got error

Undefined variable: result (View: C:\xampp\htdocs\atc\resources\views\layouts\header.blade.php)

Mar
17
2 weeks ago
Activity icon

Replied to Laravel, On Blade Used Date Time Picker Showing Error Uncaught TypeError: $(...).datetimepicker Is Not A Function

use this script

src="youtpath/datepicker.js"

then in datepicker.js file

$(function() { 'use strict';
	if($('#datetimepicker1').length) {
		var date = new Date();
		var today = new Date(date.getFullYear(), date.getMonth(), date.getDate());
$('#due_from').datepicker({
  format: "mm/dd/yyyy",
  todayHighlight: true,
  autoclose: true
});
$('#datetimepicker1').datepicker('setDate', today);

} });

Activity icon

Replied to Sendmail

@davy_yg i told this already

Activity icon

Started a new Conversation How To Return Multiple Values To Inject

in my controller i have 2 functions

public function getprofile(){

    $role=Auth::user()->role_id;
    $logged_role=Userrole::get()->where('role_id','=',$role)->first();
    $result=$logged_role['role_name'];
    return $result;

public function notification(){

    $id=Auth::user()->apartment_id;
    $ap_name=Apartment::get()->where('apartmentid','=',$id)->first();
    $name=$ap_name['apartment_name'];
    $user=User::get()->where('apartment_name','=',$name)->first();
    $admin_id=$user['id'];
    if ((Maintenance::where('admin_id', '=', $admin_id)->count() > 0)||(Otherpayment::where('admin_id', '=', $admin_id)->count() > 0)) {
        $result='found';
    }else{
        $result='notfound';
    }

    if($result=='found'){
        $maintenance=Maintenance::get()->where('admin_id', '=', $admin_id)->toArray();
        $otherpayment=Otherpayment::get()->where('admin_id', '=', $admin_id)->toArray();

    }else{
        $maintenance='';
        $otherpayment='';
    } 

              return ['result'=>$result,'maintenance'=>$maintenance,'otherpayment'=>$otherpayment];

}

i want to return $result $maintenance and $otherpayment to view blade

in my blade i inject this controller

@inject('pro', 'App\Http\Controllers\DashboardController')

@if($pro->notification()->$result =='found')

                          <a href="javascript:;" class="dropdown-item">
                              <div class="icon">
                                  <i class=" link-icon fas fa-tags"></i>
                              </div>
                              <div class="content">
                                  <p>New Payment Recived</p>
                                  <p class="sub-text text-muted">2 sec ago</p>
                              </div>
                          </a>
                          @else
                      <a href="javascript:;" class="dropdown-item">
                          <div class="icon">
                              <i class="link-icon far fa-frown"></i>
                          </div>
                          <div class="content">
                              <p>No new notifications</p>
                        <p class="sub-text text-muted">2 sec ago</p>
                          </div>
                      </a>

i got error

Undefined variable: result (View: C:\xampp\htdocs\atc\resources\views\layouts\header.blade.php)

Activity icon

Replied to Adding Ajax Dropdown Menus To Existing View?

in your controller

public function getstate(Request $request) {

$state=State::get()->where('country_id','=',$request['id'])->toArray();
if(count($state)>0){
    $content ='<select id="state" type="text" class="form-control required" name="state" value=""  autocomplete="state" autofocus  onchange="getcity(this.value)"><option selected value="">Select state</option>';
            foreach ($state as  $row) {
            $content .= '<option value="'.$row['id'].'">'. $row['name'].'</option>';
                }
              $content.='</select>';

              echo $content;
}

} public function getcity(Request $request) {

$city=City::get()->where('state_id','=',$request['id'])->toArray();
if(count($city)>0){
    $content ='<select id="city" type="text" class="form-control required" name="city" value=""  autocomplete="city" autofocus><option selected value="">Select City</option>';
            foreach ($city as  $row) {
            $content .= '<option value="'.$row['id'].'">'. $row['name'].'</option>';
                }
              $content.='</select>';

              echo $content;
}

} and finally route is

Route::post('/getstate', 'Auth\[email protected]')->name('getstate'); Route::post('/getcity', 'Auth\[email protected]')->name('getcity');