Thameera

Experience

1,220

0 Best Reply Awards

  • Member Since 9 Months Ago
  • 0 Lessons Completed
  • 1 Favorite

6th July, 2018

Thameera started a new conversation Research Project Title For Bigdata • 3 months ago

I am searching for final year research topic I am interested in networking and bigdata so i am searching for a research topic that combines both can you suggest some

26th April, 2018

Thameera started a new conversation Update A Float Column Value Results Rounding Off • 5 months ago

I am saving float value into the database through laravel controller but it saved as rounded value,

  $remain=$avail-($needed*$unit);

here is my code even i changed it to fixed value but it rounded and saved to database

18th April, 2018

Thameera left a reply on Update Function In Multiple Database Connections In Same Laravel App • 5 months ago

I got the ans i did by using eloquent model and connect the second database through it

class Item extends Eloquent
{
    protected $connection = 'mysql2';
    use SoftDeletes;
    protected $dates = ['deleted_at'];

    protected $table = 'kotitems';
    public $fillable = ['item_code','item_name','item_unit','min_level','meassure'];

}

Thameera started a new conversation Update Function In Multiple Database Connections In Same Laravel App • 5 months ago

 $countries = $db_ext->table('kotitems')->get();
        print_r($countries);die;```
here i update to second database but this works fine but when i use update function'
like
```$db_ext->table('kotitems')->where('id',$items->name) ->update(['item_unit'=>$remain]);```
it searches in database 1  and pass error message as kot.table not found but it needs to serch in scs database i can read from second database but cant write in to it

10th April, 2018

Thameera started a new conversation Integrate Plupload With Javascript • 6 months ago

I Have to integrate the plupload with laravel i have the code in core php,but still i did'nt understand the process of plupload.can you suggest any tutorials because i can't get with core php code or can you give some advices how can i integrate with laravel

4th April, 2018

Thameera left a reply on In CSS Max-width For 100% Is Working In Localhost But Not In The Server In Internet Explorer • 6 months ago

yeah i tried overflow hidden and auto but it works fine for other browsers but not in internet Explorer(version is IE 11) even in localhost it works fine in internet explorer but not in server. i use this also but that is also not bring any changes in view.

3rd April, 2018

Thameera started a new conversation In CSS Max-width For 100% Is Working In Localhost But Not In The Server In Internet Explorer • 6 months ago

max-width for images is working perfectly when i run my code in localhost but when i run it on server url it does'nt work can you give some ideas how can i overcome from this

27th March, 2018

Thameera left a reply on Overflow Hidden Is Not Working In Internet Explorer • 6 months ago

yeah i tried that but it doesn't work for internet explorer /media all/

    max-width: 100%;
    max-height: 100%;
    width: auto;
    display: inline;
    height: auto;
}
inline style
{
    display: inline;
}``` 
but this doesnt work auto function is not working it takes the orginal size of the image

26th March, 2018

Thameera started a new conversation Overflow Hidden Is Not Working In Internet Explorer • 6 months ago

i gave overflow:hidden for the image viewer but that is ok in chrome and other browsers but not in internet explorer.can you suggest what can i do for that .

22nd March, 2018

Thameera started a new conversation SetItem For InputId • 6 months ago

localStorage.setItem('myForm',{id:this.id, value:this.value}) this is the one i wrote for save id's values in input type in myform local storage but no error in console but it doesnt get the values into it can you check and say whether it is right or not

20th March, 2018

Thameera left a reply on Store Data Until The Submit Button Is Pressed As Temporary • 6 months ago

<html>
<head>
<script>
function clickCounter() {
    if(typeof(Storage) !== "undefined") {
    
        if (localStorage.clickcount)
        {
            localStorage.clickcount = document.getElementById('result').value;
        }
        else
        {
            localStorage.clickcount = 1;
        }
        document.getElementById('result').value =localStorage.clickcount;
    } else {
        document.getElementById("result").value = "Sorry, your browser does not support web storage...";
    }
}
</script>
</head>
<body>
<p><button onclick="clickCounter()" type="button">Click me!</button></p>
<input type="text" id="result"/>
<p>Click the button to see the counter increase.</p>
<p>Close the browser tab (or window), and try again, and the counter will continue to count (is not reset).</p>
</body>
</html>```
i modify the w3school code  to textbox but this code takes 1 in second click 
also  i need to modify this to without onclick function

Thameera left a reply on Store Data Until The Submit Button Is Pressed As Temporary • 6 months ago

'''

function clickCounter() { if(typeof(Storage) !== "undefined") {
    if (localStorage.clickcount)
    {
        localStorage.clickcount = document.getElementById('result').value;
    }
    else
    {
        localStorage.clickcount = 1;
    }
    document.getElementById('result').value =localStorage.clickcount;
} else {
    document.getElementById("result").value = "Sorry, your browser does not support web storage...";
}

}

Click me!

Click the button to see the counter increase.

Close the browser tab (or window), and try again, and the counter will continue to count (is not reset).

'''

Thameera left a reply on Store Data Until The Submit Button Is Pressed As Temporary • 6 months ago

@rsvb can you pls explain this

Thameera left a reply on Store Data Until The Submit Button Is Pressed As Temporary • 6 months ago

but my problem is when user fills a form suddenly machine internet goes off or something happens to machine but user did'nt submit the data so data will be lost so i need to store the data temporally until user press submit how can i do that thorough laravel or should i learn about local storage API

Thameera started a new conversation Store Data Until The Submit Button Is Pressed As Temporary • 6 months ago

I wan't to keep data inserted into form(text) before submit the form but i learned queue in laravel but i did'nt get the idea for that can you suggest the idea or tutorials for that

6th March, 2018

Thameera left a reply on Mail Config In Laravel • 7 months ago

yeah i changed but still i get the error like stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed but 2 step varification is not enabled to my mail i used

Thameera started a new conversation Mail Config In Laravel • 7 months ago

i try to send mail using laravel first i try with mailtrap.io for testing but it works fine when i change the env file to smtp it shows error as stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed or host not found my env file is belowMAIL_DRIVER=smtp

MAIL_PORT=587
[email protected].com
MAIL_PASSWORD=malara97
MAIL_ENCRYPTION=TLS```
 can you help for correct configuration


15th February, 2018

Thameera left a reply on Categorize The Database Table According To A Field In Database • 8 months ago

I have a category table that contains no of categories (id,categoryName) and training modules is the main table that contains details (traininngprogram_name,status,type,title(that is category-id), so i need to seperate the table as categories but when i use group by only one row comes from database for every category but i need all data's

Thameera started a new conversation Categorize The Database Table According To A Field In Database • 8 months ago

i want to categorize the table according to the title category so i use this query

            ->where('training_module.status', 1)
            ->groupBy('training_module.type')
            ->orderBy('training_module.id', 'DESC')
            ->get();``` but it shows single item from every category not all items in a category how  can we do that

25th January, 2018

Thameera started a new conversation Onclick Function Is Not Working For Laravel Form Text • 8 months ago

{!!Form::text('ret_date', Carbon\Carbon::today()->toDateString(), array('id' => 'datepicker7', 'class' => 'form-control','required' => 'required', 'placeholder' => 'Enter date'))!!} this is my form and my script onclick function is

            alert("hi");
}```

24th January, 2018

Thameera left a reply on Use Key And Value In Laravel Form As In Html Select • 8 months ago

yes but after that it doesn't show error like that but value still doesn't printed in controler ''' public function post_return_add(ReturnRequest $request) { $sup = $request->get('sup_id'); print_r($sup); die;

    return redirect('admin/'.'stockoutward/'.'return')->with('success', 'Data '.' has been updated');

}

''' i change the code as simple

Thameera left a reply on Use Key And Value In Laravel Form As In Html Select • 8 months ago

''' public function post_return_add(ReturnRequest $request) { foreach ($request->item_name as $key =>$v) { $da= Item::select('*')->where('id',$request->item_name[$key])->get(); foreach ($da as $da1){ $i_unit = $da1->item_unit; if($request->amo_return[$key] < $i_unit){ $data[]=array(

                    'sup_id'=>$request->get('sup_id'),
                    'bill'=>$request->get('bill'),
                    'ret_date'=>$request->ret_date,
                    'item_name'=>$request->item_name[$key],
                    'amo_return'=>$request->amo_return[$key],
                    'reason' => $request->reason[$key]);

            }else{
                return redirect('admin/'.'stockoutward/'.'return')->with('error', 'Data '.' has not been updated');
            }
        }
    }
    foreach ($data as $dat){
        $test= Item::select('*')->where('id',$dat['item_name'])->get();
        foreach ($test as $te){
            $i_unit = $te->item_unit-$dat['amo_return'];
            Item::where('id',$dat['item_name'])->update(['item_unit' => $i_unit]);
        }
    }
    Returns::insert($data);
    return redirect('admin/'.'stockoutward/'.'return')->with('success', 'Data '.' has been updated');

}

''' this is my controller post method but other variables are in laravel form so i changed only the sup_id request

Thameera left a reply on Use Key And Value In Laravel Form As In Html Select • 8 months ago

yes i use $request->get('suppiler'); code in controller to pass value from blade as you mentioned as here

<select id='suppiler' name='suppiler'>
      <option value=''>Select supplier</option>
  @foreach ($supp as $key => $value) 
       <option value='{{$key}}'>{{value}}</option>
  @endforeach
</select>

but still it value doesnt pass to controller

Thameera left a reply on Use Key And Value In Laravel Form As In Html Select • 8 months ago

and my laravel form is

{!!Form::label("Supplier name")!!}
                            {!!Form::select('sup_id1', $supp, null, ['class'=>'form-control', 'placeholder'=>'Select supplier name'])!!}

but it goes to database but why that html shows error as 0 found

Thameera left a reply on Use Key And Value In Laravel Form As In Html Select • 8 months ago

                                    <option value="">--- Select State ---</option>
                                    @foreach ($supp as $key => $value)
                                        <option value="{{ $key }}">{{ $value }}</option>
                                    @endforeach
                                </select>```

                           
This is my html select form but its doesnt go to controller but i want to sepeate key and value to peform script functions
                    

Thameera left a reply on Use Key And Value In Laravel Form As In Html Select • 8 months ago

yes but i want that in laravel form select because basic html is not passed to controller

23rd January, 2018

Thameera left a reply on Use Key And Value In Laravel Form As In Html Select • 8 months ago

can't i use laravel form to use key and value like html

Thameera left a reply on Use Key And Value In Laravel Form As In Html Select • 8 months ago

''' Select supplier: --- Select State --- @foreach ($supp as $key => $value) {{ $value }} @endforeach Select bill no: --- Select State --- ''' this is my html form

Thameera started a new conversation Use Key And Value In Laravel Form As In Html Select • 8 months ago

'''

{!!Form::label("Supplier name")!!} {!!Form::select('sup_id', $supp, null, ['class' => 'form-control', 'placeholder'=>'Select supplier name'])!!} {!!$errors->first('sup_name')!!} {!!Form::label("Bill/Invoice")!!} {!!Form::text('bill',null, ['class' => 'form-control','required' => 'required', 'placeholder' => 'Enter the Bill/Invoice'])!!} {!!$errors->first('bill')!!} '''

this is my laravel select form but i use basic html to populate dropdown based on previous dropdown now page shows error when submit as ''' Select supplier: --- Select State --- @foreach ($supp as $key => $value) {{ $value }} @endforeach Select bill no: --- Select State --- '''

21st January, 2018

Thameera left a reply on Path For Ajax In Laravel • 8 months ago

can't we give route instead of url in script url because it doesnt show values of dropdown beacuse in url we cant check that route is passed or not

Thameera left a reply on Path For Ajax In Laravel • 8 months ago

{ public function myformAjax($id) {

    $bill = DB::table("return")
        ->where("sup_id",$id)
        ->lists("bill","id");
    return json_encode($bill);
}}

this is my myform.ajax method

erorr shows Use of undefined constant stateID - assumed 'stateID' but stateID can be printed before ajax method but not identified in routes

20th January, 2018

Thameera started a new conversation Path For Ajax In Laravel • 8 months ago

$('select[name="sup_id1"]').on('change', function() { var stateID = $(this).val(); if(stateID) { $.ajax({ url: "{{route( '/stockoutward/return/'+stateID)}}", type: "GET", dataType: "json", success:function(data) {

                        $('select[name="bill1"]').empty();
                        $.each(data, function(key, value) {
                            $('select[name="bill1"]').append('<option value="'+ key +'">'+ value +'</option>');
                        });

                    }
                });
            }else{
                $('select[name="bill1"]').empty();
            }
        });

    });

my code is this but my route shows error "Use of undefined constant stateID " like this my routes is Route::get('stockoutward/return/{id}',array('as'=>'myform.ajax','uses'=>'Admin\[email protected]')); what is the problem in my route

11th January, 2018

Thameera left a reply on Why Onchange Function Calling From Blade To Script Is Not Working • 9 months ago

This is my code in javascript function myfunction() { alert("hi"); }

Thameera left a reply on Why Onchange Function Calling From Blade To Script Is Not Working • 9 months ago

This is my code in blade

Select a product... @foreach ($states as $service) {{ $service->name }} @endforeach

10th January, 2018

Thameera left a reply on Why Onchange Function Calling From Blade To Script Is Not Working • 9 months ago

i called onchange function in select form unfortunately that is not there

Thameera started a new conversation Why Onchange Function Calling From Blade To Script Is Not Working • 9 months ago

''' Select a product... @foreach ($states as $service) {{ $service->name }} @endforeach ''' this is my blade but i put my function in script ''' function myfunction() { alert("hi"); }'''

but this simple function is not working

Thameera started a new conversation Pass Javascript Variable Into Blade Inside Javascript • 9 months ago

$('#dynamic_field').append('Select a product... @foreach ($states as $service)\n' + ' {{ $service->name }}\n' + ' @endforeach {!! Form::text('code[]', null, array('class' => 'form-control', 'placeholder' => 'Enter code','id'=>'code[]')) !!}{!!Form::text('unit[]', null, array('class' => 'form-control', 'placeholder' => 'Enter unit','id'=>'unit')) !!}X'); }); this is my code here i have to pass javascript variable into input form but it doesnt work my code is this var test="test"; $('#unit').val(test);

9th January, 2018

Thameera started a new conversation Seperate Fields In Laravel Select Form • 9 months ago

$states=TagList::all(); in controller i retrieve all elements and pass it to view i can use in basic html like Select a service... @foreach ($states as $service) {{ $service->name }} @endforeach but how can i seperate this in laravel select form {!!Form::select('name[]', $states->name, null, ['class' => 'form-control', 'placeholder'=>'Select a blog category','id'=>'name'])! it shows error also i need other seperations

Thameera left a reply on Method To Use Id When Input Type Is An Array • 9 months ago

{!!Form::text('unit[ ]', null, array('class' => 'form-control', 'placeholder' => 'Enter unit','id'=>'unit'))!!} this is my form

Thameera started a new conversation Method To Use Id When Input Type Is An Array • 9 months ago

$('#name').on('change',function(){ var price = $(this).children('option:selected').data('price'); $('#unit').val(price); }); this is my js function for get text field according to the change in dropdown but here i want input as multiple so i use array how can i define id here for js function {!!Form::text('unit', null, array('class' => 'form-control', 'placeholder' => 'Enter unit','id'=>'unit'))!!} this is my input form

Thameera started a new conversation Pass Processed Ajax Data For Options As Variable Into Laravel Form Input Select • 9 months ago

$('select[name="unit"]').on('change', function() { var unitID = $(this).val(); if(unitID) { $.ajax({ url: '/stock_receive/add/ajax'+unitID, type: "GET", dataType: "json", success:function(data) {

                        $('select[name="name"]').empty();
                        $.each(data, function(key, value) {
                            $('select[name="name"]').append('<option value="'+ key +'">'+ value +'</option>');
                        });


                    }
                });
            }else{
                $('select[name="name"]').empty();
            }
        });

this is my code to filter the options for input select but here i am using laravel forms how can i change the code to pass data in laravel select input

my laravel input is like {!!Form::select('unit[]', $units, array('class' => 'form-control', 'placeholder' => 'Enter unit','id'=>'unit[]'))!!} here how can i post the data into $unit

Thameera left a reply on How To Initiate Lists • 9 months ago

yes thats working

Thameera started a new conversation How To Initiate Lists • 9 months ago

public function myform() { $states = DB::table("demo_state")->lists("name","id"); return view('myform',compact('states')); } here i use lists to get the id when name is selected but when compile it shows

"Call to undefined method Illuminate\Database\Query\Builder::lists()" this error am i need to initiate lists in model and how to do that

7th January, 2018

Thameera started a new conversation How To Get A Post Input Data In Another Page Which Is Posted In Different View • 9 months ago

i want to print pdf report employee details between two dates so date is posted in on index page but i do filter function in pdf blade how can i do that

6th January, 2018

Thameera left a reply on Get Retrieved Value Of Database As Single Input • 9 months ago

This code gives error as Call to undefined method stdClass::pluck()

Thameera started a new conversation Get Retrieved Value Of Database As Single Input • 9 months ago

$user = DB::table('users')->where('name', 'John')->pluck("phonenumber"); when i use this type query it gives as array datatype even it is a single value how to get it as single value

Edit Your Profile
Update

Want to change your profile photo? We pull from gravatar.com.